Goal: Producing reproducible descriptive plots, bivariate descriptive statistics tables, multivariable regression
install.packages("compareGroups")
install.packages("DiagrammeR")
install.packages("DiagrammeRsvg")
install.packages("rsvg")
install.packages("ggpubr")
install.packages("hrbrthemes")
library(here)
## here() starts at /Volumes/GoogleDrive/My Drive/Fragile_Families/Air_Poll_PEGS/Prenatal-Particulate-Matter-Exposure-and-Saliva-DNA-Methylation-at-Ages-9-and-15-in-the-FFCW
library(compareGroups)
library(DiagrammeR)
library(DiagrammeRsvg)
library(rsvg)
## Linking to librsvg 2.48.4
library(ggplot2)
library(ggpubr)
library(hrbrthemes)
library(nlme)
hrbrthemes::import_roboto_condensed()
## You will likely need to install these fonts on your system as well.
##
## You can find them in [/Library/Frameworks/R.framework/Versions/4.1/Resources/library/hrbrthemes/fonts/roboto-condensed]
date <- format(Sys.Date(), "%Y%m%d")
load(file=here("Data", paste0("FFCW_AirPoll_DNAm_", date, ".rda")))
load(file=here("Data", paste0("FFCW_AirPoll_DNAm_Included_", date, ".rda")))
summary(include$birth.pm10)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 7.469 13.446 15.601 14.984 16.670 20.171 117
summary(include$peg.pm10.centstd)
## V1
## Min. :-0.98740
## 1st Qu.:-0.45109
## Median :-0.19758
## Mean :-0.08303
## 3rd Qu.: 0.15643
## Max. : 2.25690
cor(include$birth.pm10, include$peg.pm10.centstd, use="pairwise.complete.obs")
## [,1]
## [1,] 0.02506577
cor.test(include$birth.pm10, include$peg.pm10.centstd, use="pairwise.complete.obs")
##
## Pearson's product-moment correlation
##
## data: include$birth.pm10 and include$peg.pm10.centstd
## t = 0.94584, df = 1423, p-value = 0.3444
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.02689794 0.07689438
## sample estimates:
## cor
## 0.02506577
cor.test(include$birth.pm10[include$childteen=="C"], include$peg.pm10.cent[include$childteen=="C"])
##
## Pearson's product-moment correlation
##
## data: include$birth.pm10[include$childteen == "C"] and include$peg.pm10.cent[include$childteen == "C"]
## t = 1.2021, df = 688, p-value = 0.2297
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.02895491 0.12001039
## sample estimates:
## cor
## 0.04578225
cor.test(include$birth.pm10[include$childteen=="T"], include$peg.pm10.cent[include$childteen=="T"])
##
## Pearson's product-moment correlation
##
## data: include$birth.pm10[include$childteen == "T"] and include$peg.pm10.cent[include$childteen == "T"]
## t = 0.24723, df = 733, p-value = 0.8048
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.06322623 0.08139356
## sample estimates:
## cor
## 0.009131415
summary(include$birth.pm25)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 14.34 23.83 27.73 27.90 34.57 45.00
summary(include$peg.pm25.centstd)
## V1
## Min. :-1.96146
## 1st Qu.:-0.58886
## Median :-0.11805
## Mean :-0.05198
## 3rd Qu.: 0.39186
## Max. : 2.80857
cor.test(include$birth.pm25, include$peg.pm25.centstd)
##
## Pearson's product-moment correlation
##
## data: include$birth.pm25 and include$peg.pm25.centstd
## t = 1.505, df = 1540, p-value = 0.1325
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.01161822 0.08807393
## sample estimates:
## cor
## 0.03832321
p25 <- ggplot(include, aes(x=birth.pm25, y=peg.pm25.centstd)) +
xlab("Prenatal Particulate Matter 2.5 uM Exposure (ug/m3/day)") +
ylab("Standardized Saliva Poly DNA Methylation Score
for Particulate Matter 2.5 uM Exposure") +
geom_point() +
geom_smooth(method=lm , color="dodgerblue", fill="#69b3a2", se=TRUE) +
stat_cor(method= "pearson", label.x = 35) +
theme_bw()
p25
## `geom_smooth()` using formula 'y ~ x'

dim(include[include$childteen == "C",])
## [1] 749 222
p25.a9 <- ggplot(include[include$childteen == "C",], aes(x=birth.pm25, y=peg.pm25.centstd)) +
xlab("Prenatal 2.5 uM Particulate Matter Exposure (ug/m3/day)") +
ylab("Standardized Saliva Poly DNA Methylation Score
for 2.5 uM Particulate Matter Exposure") +
ggtitle("Age 9") +
geom_point() +
geom_smooth(method=lm , color="dodgerblue", fill="#69b3a2", se=TRUE) +
stat_cor(method= "pearson", label.x = 35) +
theme_bw()
p25.a9
## `geom_smooth()` using formula 'y ~ x'

p25.a15 <- ggplot(include[include$childteen == "T",], aes(x=birth.pm25, y=peg.pm25.centstd)) +
xlab("Prenatal 2.5 uM Particulate Matter Exposure (ug/m3/day)") +
ylab("Standardized Saliva Poly DNA Methylation Score
for 2.5 uM Particulate Matter Exposure") +
ggtitle("Age 15") +
geom_point() +
geom_smooth(method=lm , color="dodgerblue", fill="#69b3a2", se=TRUE) +
stat_cor(method= "pearson", label.x = 35) +
theme_bw()
p25.a15
## `geom_smooth()` using formula 'y ~ x'

p10 <- ggplot(include, aes(x=birth.pm10, y=peg.pm10.centstd)) +
xlab("Prenatal 10 uM Particulate Matter Exposure (ug/m3/day)") +
ylab("Standardized Saliva Poly DNA Methylation Score
for 10 uM Particulate Matter Exposure") +
geom_point() +
geom_smooth(method=lm , color="dodgerblue", fill="#69b3a2", se=TRUE) +
stat_cor(method= "pearson", label.x = 7) +
theme_bw()
p10
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 117 rows containing non-finite values (stat_smooth).
## Warning: Removed 117 rows containing non-finite values (stat_cor).
## Warning: Removed 117 rows containing missing values (geom_point).

p10.a9 <- ggplot(include[include$childteen == "C",], aes(x=birth.pm10, y=peg.pm10.centstd)) +
xlab("Prenatal 10 uM Particulate Matter Exposure (ug/m3/day)") +
ylab("Standardized Saliva Poly DNA Methylation Score
for 10 uM Particulate Matter Exposure") +
ggtitle("Age 9") +
geom_point() +
geom_smooth(method=lm , color="dodgerblue", fill="#69b3a2", se=TRUE) +
stat_cor(method= "pearson", label.x = 7) +
theme_bw()
p10.a9
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 59 rows containing non-finite values (stat_smooth).
## Warning: Removed 59 rows containing non-finite values (stat_cor).
## Warning: Removed 59 rows containing missing values (geom_point).

p10.a15 <- ggplot(include[include$childteen == "T",], aes(x=birth.pm10, y=peg.pm10.centstd)) +
xlab("Prenatal 10 uM Particulate Matter Exposure (ug/m3/day)") +
ylab("Standardized Saliva Poly DNA Methylation Score
for 10 uM Particulate Matter Exposure") +
ggtitle("Age 15") +
geom_point() +
geom_smooth(method=lm , color="dodgerblue", fill="#69b3a2", se=TRUE) +
stat_cor(method= "pearson", label.x = 7) +
theme_bw()
p10.a15
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 58 rows containing non-finite values (stat_smooth).
## Warning: Removed 58 rows containing non-finite values (stat_cor).
## Warning: Removed 58 rows containing missing values (geom_point).

ggarrange(p25, p10, ncol=2)
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 117 rows containing non-finite values (stat_smooth).
## Warning: Removed 117 rows containing non-finite values (stat_cor).
## Warning: Removed 117 rows containing missing values (geom_point).

pdf(file=here("Output",paste0("FFCW_AirPoll_PEGStd_Bivariate_Plots_", date, ".pdf")))
p25
## `geom_smooth()` using formula 'y ~ x'
p25.a9
## `geom_smooth()` using formula 'y ~ x'
p25.a15
## `geom_smooth()` using formula 'y ~ x'
p10
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 117 rows containing non-finite values (stat_smooth).
## Warning: Removed 117 rows containing non-finite values (stat_cor).
## Warning: Removed 117 rows containing missing values (geom_point).
p10.a9
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 59 rows containing non-finite values (stat_smooth).
## Warning: Removed 59 rows containing non-finite values (stat_cor).
## Warning: Removed 59 rows containing missing values (geom_point).
p10.a15
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 58 rows containing non-finite values (stat_smooth).
## Warning: Removed 58 rows containing non-finite values (stat_cor).
## Warning: Removed 58 rows containing missing values (geom_point).
dev.off()
## quartz_off_screen
## 2
p10.a15.1 <- ggplot(include[include$childteen == "T",], aes(x=birth.pm10, y=cg00905156.percent)) +
xlab("Prenatal 10 uM Particulate Matter Exposure (ug/m3/day)") +
ylab("Percent DNA Methylation at cg00905156") +
ggtitle("Age 15 cg00905156") +
geom_point() +
geom_smooth(method=lm , color="dodgerblue", fill="#69b3a2", se=TRUE) +
stat_cor(method= "pearson", label.x = 7) +
theme_bw()
p10.a15.1
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 58 rows containing non-finite values (stat_smooth).
## Warning: Removed 58 rows containing non-finite values (stat_cor).
## Warning: Removed 58 rows containing missing values (geom_point).

p10.a15.2 <- ggplot(include[include$childteen == "T",], aes(x=birth.pm10, y=cg06849931.percent)) +
xlab("Prenatal 10 uM Particulate Matter Exposure (ug/m3/day)") +
ylab("Percent DNA Methylation at cg06849931") +
ggtitle("Age 15 cg06849931") +
geom_point() +
geom_smooth(method=lm , color="dodgerblue", fill="#69b3a2", se=TRUE) +
stat_cor(method= "pearson", label.x = 7) +
theme_bw()
p10.a15.2
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 58 rows containing non-finite values (stat_smooth).
## Warning: Removed 58 rows containing non-finite values (stat_cor).
## Warning: Removed 58 rows containing missing values (geom_point).

p10.a15.3 <- ggplot(include[include$childteen == "T",], aes(x=birth.pm10, y=cg15082635.percent)) +
xlab("Prenatal 10 uM Particulate Matter Exposure (ug/m3/day)") +
ylab("Percent DNA Methylation at cg15082635") +
ggtitle("Age 15 cg15082635") +
geom_point() +
geom_smooth(method=lm , color="dodgerblue", fill="#69b3a2", se=TRUE) +
stat_cor(method= "pearson", label.x = 7) +
theme_bw()
p10.a15.3
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 58 rows containing non-finite values (stat_smooth).
## Warning: Removed 58 rows containing non-finite values (stat_cor).
## Warning: Removed 58 rows containing missing values (geom_point).

p10.a15.4 <- ggplot(include[include$childteen == "T",], aes(x=birth.pm10, y=cg18640183.percent)) +
xlab("Prenatal 10 uM Particulate Matter Exposure (ug/m3/day)") +
ylab("Percent DNA Methylation at cg18640183") +
ggtitle("Age 15 cg18640183") +
geom_point() +
geom_smooth(method=lm , color="dodgerblue", fill="#69b3a2", se=TRUE) +
stat_cor(method= "pearson", label.x = 7) +
theme_bw()
p10.a15.4
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 58 rows containing non-finite values (stat_smooth).
## Warning: Removed 58 rows containing non-finite values (stat_cor).
## Warning: Removed 58 rows containing missing values (geom_point).

p10.a15.5 <- ggplot(include[include$childteen == "T",], aes(x=birth.pm10, y=cg20340716.percent)) +
xlab("Prenatal 10 uM Particulate Matter Exposure (ug/m3/day)") +
ylab("Percent DNA Methylation at cg20340716") +
ggtitle("Age 15 cg20340716") +
geom_point() +
geom_smooth(method=lm , color="dodgerblue", fill="#69b3a2", se=TRUE) +
stat_cor(method= "pearson", label.x = 7) +
theme_bw()
p10.a15.5
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 58 rows containing non-finite values (stat_smooth).
## Warning: Removed 58 rows containing non-finite values (stat_cor).
## Warning: Removed 58 rows containing missing values (geom_point).

p10.a15.6 <- ggplot(include[include$childteen == "T",], aes(x=birth.pm10, y=cg24127244.percent)) +
xlab("Prenatal 10 uM Particulate Matter Exposure (ug/m3/day)") +
ylab("Percent DNA Methylation at cg24127244") +
ggtitle("Age 15 cg24127244") +
geom_point() +
geom_smooth(method=lm , color="dodgerblue", fill="#69b3a2", se=TRUE) +
stat_cor(method= "pearson", label.x = 7) +
theme_bw()
p10.a15.6
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 58 rows containing non-finite values (stat_smooth).
## Warning: Removed 58 rows containing non-finite values (stat_cor).
## Warning: Removed 58 rows containing missing values (geom_point).

#ggarrange(p25, p10, ncol=2)
pdf(file=here("Output",paste0("FFCW_AirPoll_SingleSitePM10_Bivariate_Plots_", date, ".pdf")))
p10.a15.1
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 58 rows containing non-finite values (stat_smooth).
## Warning: Removed 58 rows containing non-finite values (stat_cor).
## Warning: Removed 58 rows containing missing values (geom_point).
p10.a15.2
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 58 rows containing non-finite values (stat_smooth).
## Warning: Removed 58 rows containing non-finite values (stat_cor).
## Warning: Removed 58 rows containing missing values (geom_point).
p10.a15.3
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 58 rows containing non-finite values (stat_smooth).
## Warning: Removed 58 rows containing non-finite values (stat_cor).
## Warning: Removed 58 rows containing missing values (geom_point).
p10.a15.4
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 58 rows containing non-finite values (stat_smooth).
## Warning: Removed 58 rows containing non-finite values (stat_cor).
## Warning: Removed 58 rows containing missing values (geom_point).
p10.a15.5
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 58 rows containing non-finite values (stat_smooth).
## Warning: Removed 58 rows containing non-finite values (stat_cor).
## Warning: Removed 58 rows containing missing values (geom_point).
p10.a15.6
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 58 rows containing non-finite values (stat_smooth).
## Warning: Removed 58 rows containing non-finite values (stat_cor).
## Warning: Removed 58 rows containing missing values (geom_point).
dev.off()
## quartz_off_screen
## 2
mod.crude<-lm(peg.pm10.centstd ~ birth.pm10, data=include)
summary(mod.crude)
mod<-lm(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + ethrace.factor + cm1inpov + m1b2 + epithelial, data=include)
summary(mod)
mod.a9<-lm(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + ethrace.factor + cm1inpov + m1b2 + epithelial, data=include[include$childteen=="C",])
summary(mod.a9)
mod.a15<-lm(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + ethrace.factor + cm1inpov + m1b2 + epithelial, data=include[include$childteen=="T",])
summary(mod.a15)
mod.crude<-lm(peg.pm25.centstd ~ birth.pm25, data=include)
summary(mod.crude)
mod<-lm(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + ethrace.factor + cm1inpov + m1b2 + epithelial, data=include)
summary(mod)
mod.a9<-lm(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + ethrace.factor + cm1inpov + m1b2 + epithelial, data=include[include$childteen=="C",])
summary(mod.a9)
mod.a15<-lm(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + ethrace.factor + cm1inpov + m1b2 + epithelial, data=include[include$childteen=="T",])
summary(mod.a15)
output<-data.frame(matrix(nrow=6, ncol= 15))
colnames(output) <- c("Exposure", "Age", "N", "IQRcoef.r", "IQRlcl.r", "IQRucl.r", "pval.r", "IQRcoef.c", "IQRlcl.c", "IQRucl.c", "pval.c", "IQRcoef.cs", "IQRlcl.cs", "IQRucl.cs", "pval.cs")
output$Exposure <- c(rep("PM2.5", 3), rep("PM10", 3))
output$Age <- c("All", "9", "15")
IQR(include$birth.pm25, na.rm=T)
## [1] 10.74194
IQR(include$birth.pm10, na.rm=T)
## [1] 3.223546
### Raw
mod<-lm(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include)
summary(mod)
##
## Call:
## lm(formula = peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.44351 -0.29124 -0.03297 0.23905 1.63541
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.218262 0.247480 25.126 <2e-16 ***
## birth.pm25 -0.002444 0.001578 -1.549 0.1216
## age.dnam -0.007199 0.003606 -1.996 0.0461 *
## sexm 0.048871 0.022109 2.210 0.0272 *
## matrace.factorNon-Hispanic Black 0.454238 0.032763 13.864 <2e-16 ***
## matrace.factorHispanic 0.050338 0.037603 1.339 0.1809
## matrace.factorOther 0.127801 0.064773 1.973 0.0487 *
## cm1inpov 0.008473 0.005263 1.610 0.1076
## m1b2 0.030455 0.030021 1.014 0.3105
## Epithelial.cells -3.251741 0.229881 -14.145 <2e-16 ***
## Leukocytes -6.296349 0.214642 -29.334 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4313 on 1531 degrees of freedom
## Multiple R-squared: 0.6681, Adjusted R-squared: 0.6659
## F-statistic: 308.2 on 10 and 1531 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="C",])
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "C", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.98221 -0.28743 -0.02908 0.24590 1.38465
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.445900 0.563023 9.673 <2e-16 ***
## birth.pm25 -0.001956 0.002319 -0.844 0.3991
## age.dnam 0.062588 0.048379 1.294 0.1962
## sexm 0.056485 0.031230 1.809 0.0709 .
## matrace.factorNon-Hispanic Black 0.456833 0.046336 9.859 <2e-16 ***
## matrace.factorHispanic 0.019871 0.053493 0.371 0.7104
## matrace.factorOther 0.123495 0.091893 1.344 0.1794
## cm1inpov 0.012652 0.007461 1.696 0.0903 .
## m1b2 0.031438 0.042503 0.740 0.4597
## Epithelial.cells -2.978967 0.336514 -8.852 <2e-16 ***
## Leukocytes -6.208579 0.310631 -19.987 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4245 on 738 degrees of freedom
## Multiple R-squared: 0.6516, Adjusted R-squared: 0.6469
## F-statistic: 138 on 10 and 738 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="T",])
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "T", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.43336 -0.28655 -0.03036 0.23866 1.59827
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.396585 0.607028 8.890 <2e-16 ***
## birth.pm25 -0.001611 0.002255 -0.715 0.475
## age.dnam 0.052836 0.032621 1.620 0.106
## sexm 0.039777 0.031381 1.268 0.205
## matrace.factorNon-Hispanic Black 0.449189 0.046662 9.626 <2e-16 ***
## matrace.factorHispanic 0.064485 0.053675 1.201 0.230
## matrace.factorOther 0.142255 0.091394 1.557 0.120
## cm1inpov 0.007008 0.007498 0.935 0.350
## m1b2 0.039755 0.042579 0.934 0.351
## Epithelial.cells -3.488749 0.318502 -10.954 <2e-16 ***
## Leukocytes -6.416369 0.299543 -21.421 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4376 on 782 degrees of freedom
## Multiple R-squared: 0.6842, Adjusted R-squared: 0.6802
## F-statistic: 169.5 on 10 and 782 DF, p-value: < 2.2e-16
output$N[1:3] <- c(nrow(model.frame(mod)), nrow(model.frame(mod.a9)), nrow(model.frame(mod.a15)))
output$IQRcoef.r[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.r[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.r[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.r[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include)
summary(mod)
##
## Call:
## lm(formula = peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.6581 -0.1420 -0.0116 0.1233 1.1677
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.521334 0.132892 26.498 < 2e-16 ***
## birth.pm10 -0.004215 0.002109 -1.999 0.04584 *
## age.dnam 0.005281 0.001906 2.771 0.00567 **
## sexm 0.029846 0.011625 2.567 0.01035 *
## matrace.factorNon-Hispanic Black 0.003325 0.016922 0.197 0.84423
## matrace.factorHispanic -0.028031 0.020308 -1.380 0.16772
## matrace.factorOther -0.068369 0.034268 -1.995 0.04622 *
## cm1inpov -0.002297 0.002749 -0.836 0.40344
## m1b2 -0.011871 0.016037 -0.740 0.45930
## Epithelial.cells -0.636195 0.121404 -5.240 1.85e-07 ***
## Leukocytes -3.557948 0.113289 -31.406 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2176 on 1414 degrees of freedom
## (117 observations deleted due to missingness)
## Multiple R-squared: 0.8204, Adjusted R-squared: 0.8191
## F-statistic: 645.8 on 10 and 1414 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="C",])
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "C", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.63216 -0.15057 -0.01596 0.12294 1.18076
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.214426 0.315658 10.183 < 2e-16 ***
## birth.pm10 -0.001163 0.003030 -0.384 0.70135
## age.dnam 0.030199 0.027873 1.083 0.27899
## sexm 0.020818 0.016847 1.236 0.21699
## matrace.factorNon-Hispanic Black 0.023042 0.024540 0.939 0.34807
## matrace.factorHispanic -0.004747 0.029416 -0.161 0.87186
## matrace.factorOther -0.052276 0.050386 -1.038 0.29987
## cm1inpov -0.001332 0.003995 -0.333 0.73896
## m1b2 -0.029158 0.023278 -1.253 0.21078
## Epithelial.cells -0.610568 0.181101 -3.371 0.00079 ***
## Leukocytes -3.512162 0.166771 -21.060 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2196 on 679 degrees of freedom
## (59 observations deleted due to missingness)
## Multiple R-squared: 0.782, Adjusted R-squared: 0.7788
## F-statistic: 243.6 on 10 and 679 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="T",])
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "T", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.60698 -0.13903 -0.00462 0.12867 1.18525
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.207552 0.350745 9.145 < 2e-16 ***
## birth.pm10 -0.007504 0.002985 -2.514 0.0122 *
## age.dnam 0.032467 0.020208 1.607 0.1086
## sexm 0.036896 0.016153 2.284 0.0226 *
## matrace.factorNon-Hispanic Black -0.016198 0.023518 -0.689 0.4912
## matrace.factorHispanic -0.053499 0.028225 -1.895 0.0584 .
## matrace.factorOther -0.079437 0.046903 -1.694 0.0908 .
## cm1inpov -0.002633 0.003818 -0.690 0.4907
## m1b2 0.004812 0.022182 0.217 0.8283
## Epithelial.cells -0.689189 0.165184 -4.172 3.38e-05 ***
## Leukocytes -3.624538 0.155364 -23.329 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2161 on 724 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.8438, Adjusted R-squared: 0.8416
## F-statistic: 391 on 10 and 724 DF, p-value: < 2.2e-16
output$N[4:6] <- c(nrow(model.frame(mod)), nrow(model.frame(mod.a9)), nrow(model.frame(mod.a15)))
output$IQRcoef.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.r[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Centered
mod<-lm(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include)
summary(mod)
##
## Call:
## lm(formula = peg.pm25.centstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.44351 -0.29124 -0.03297 0.23905 1.63541
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.218262 0.247480 25.126 <2e-16 ***
## birth.pm25 -0.002444 0.001578 -1.549 0.1216
## age.dnam -0.007199 0.003606 -1.996 0.0461 *
## sexm 0.048871 0.022109 2.210 0.0272 *
## matrace.factorNon-Hispanic Black 0.454238 0.032763 13.864 <2e-16 ***
## matrace.factorHispanic 0.050338 0.037603 1.339 0.1809
## matrace.factorOther 0.127801 0.064773 1.973 0.0487 *
## cm1inpov 0.008473 0.005263 1.610 0.1076
## m1b2 0.030455 0.030021 1.014 0.3105
## Epithelial.cells -3.251741 0.229881 -14.145 <2e-16 ***
## Leukocytes -6.296349 0.214642 -29.334 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4313 on 1531 degrees of freedom
## Multiple R-squared: 0.6681, Adjusted R-squared: 0.6659
## F-statistic: 308.2 on 10 and 1531 DF, p-value: < 2.2e-16
summary(mod)$coef[2,4]
## [1] 0.1215543
mod.a9<-lm(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="C",])
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm25.centstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "C", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.98221 -0.28743 -0.02908 0.24590 1.38465
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.445900 0.563023 9.673 <2e-16 ***
## birth.pm25 -0.001956 0.002319 -0.844 0.3991
## age.dnam 0.062588 0.048379 1.294 0.1962
## sexm 0.056485 0.031230 1.809 0.0709 .
## matrace.factorNon-Hispanic Black 0.456833 0.046336 9.859 <2e-16 ***
## matrace.factorHispanic 0.019871 0.053493 0.371 0.7104
## matrace.factorOther 0.123495 0.091893 1.344 0.1794
## cm1inpov 0.012652 0.007461 1.696 0.0903 .
## m1b2 0.031438 0.042503 0.740 0.4597
## Epithelial.cells -2.978967 0.336514 -8.852 <2e-16 ***
## Leukocytes -6.208579 0.310631 -19.987 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4245 on 738 degrees of freedom
## Multiple R-squared: 0.6516, Adjusted R-squared: 0.6469
## F-statistic: 138 on 10 and 738 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="T",])
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm25.centstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "T", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.43336 -0.28655 -0.03036 0.23866 1.59827
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.396585 0.607028 8.890 <2e-16 ***
## birth.pm25 -0.001611 0.002255 -0.715 0.475
## age.dnam 0.052836 0.032621 1.620 0.106
## sexm 0.039777 0.031381 1.268 0.205
## matrace.factorNon-Hispanic Black 0.449189 0.046662 9.626 <2e-16 ***
## matrace.factorHispanic 0.064485 0.053675 1.201 0.230
## matrace.factorOther 0.142255 0.091394 1.557 0.120
## cm1inpov 0.007008 0.007498 0.935 0.350
## m1b2 0.039755 0.042579 0.934 0.351
## Epithelial.cells -3.488749 0.318502 -10.954 <2e-16 ***
## Leukocytes -6.416369 0.299543 -21.421 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4376 on 782 degrees of freedom
## Multiple R-squared: 0.6842, Adjusted R-squared: 0.6802
## F-statistic: 169.5 on 10 and 782 DF, p-value: < 2.2e-16
output$IQRcoef.c[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.c[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.c[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.c[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include)
summary(mod)
##
## Call:
## lm(formula = peg.pm10.centstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.6581 -0.1420 -0.0116 0.1233 1.1677
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.521334 0.132892 26.498 < 2e-16 ***
## birth.pm10 -0.004215 0.002109 -1.999 0.04584 *
## age.dnam 0.005281 0.001906 2.771 0.00567 **
## sexm 0.029846 0.011625 2.567 0.01035 *
## matrace.factorNon-Hispanic Black 0.003325 0.016922 0.197 0.84423
## matrace.factorHispanic -0.028031 0.020308 -1.380 0.16772
## matrace.factorOther -0.068369 0.034268 -1.995 0.04622 *
## cm1inpov -0.002297 0.002749 -0.836 0.40344
## m1b2 -0.011871 0.016037 -0.740 0.45930
## Epithelial.cells -0.636195 0.121404 -5.240 1.85e-07 ***
## Leukocytes -3.557948 0.113289 -31.406 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2176 on 1414 degrees of freedom
## (117 observations deleted due to missingness)
## Multiple R-squared: 0.8204, Adjusted R-squared: 0.8191
## F-statistic: 645.8 on 10 and 1414 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="C",])
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm10.centstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "C", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.63216 -0.15057 -0.01596 0.12294 1.18076
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.214426 0.315658 10.183 < 2e-16 ***
## birth.pm10 -0.001163 0.003030 -0.384 0.70135
## age.dnam 0.030199 0.027873 1.083 0.27899
## sexm 0.020818 0.016847 1.236 0.21699
## matrace.factorNon-Hispanic Black 0.023042 0.024540 0.939 0.34807
## matrace.factorHispanic -0.004747 0.029416 -0.161 0.87186
## matrace.factorOther -0.052276 0.050386 -1.038 0.29987
## cm1inpov -0.001332 0.003995 -0.333 0.73896
## m1b2 -0.029158 0.023278 -1.253 0.21078
## Epithelial.cells -0.610568 0.181101 -3.371 0.00079 ***
## Leukocytes -3.512162 0.166771 -21.060 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2196 on 679 degrees of freedom
## (59 observations deleted due to missingness)
## Multiple R-squared: 0.782, Adjusted R-squared: 0.7788
## F-statistic: 243.6 on 10 and 679 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="T",])
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm10.centstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "T", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.60698 -0.13903 -0.00462 0.12867 1.18525
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.207552 0.350745 9.145 < 2e-16 ***
## birth.pm10 -0.007504 0.002985 -2.514 0.0122 *
## age.dnam 0.032467 0.020208 1.607 0.1086
## sexm 0.036896 0.016153 2.284 0.0226 *
## matrace.factorNon-Hispanic Black -0.016198 0.023518 -0.689 0.4912
## matrace.factorHispanic -0.053499 0.028225 -1.895 0.0584 .
## matrace.factorOther -0.079437 0.046903 -1.694 0.0908 .
## cm1inpov -0.002633 0.003818 -0.690 0.4907
## m1b2 0.004812 0.022182 0.217 0.8283
## Epithelial.cells -0.689189 0.165184 -4.172 3.38e-05 ***
## Leukocytes -3.624538 0.155364 -23.329 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2161 on 724 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.8438, Adjusted R-squared: 0.8416
## F-statistic: 391 on 10 and 724 DF, p-value: < 2.2e-16
output$IQRcoef.c[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.c[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.c[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.c[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Centered & Scaled
mod<-lm(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include)
summary(mod)
##
## Call:
## lm(formula = peg.pm25.centscalestd ~ birth.pm25 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes, data = include)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.0604 -0.2445 -0.0272 0.2026 1.3866
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.856240 0.202688 23.959 < 2e-16 ***
## birth.pm25 -0.001599 0.001292 -1.238 0.21592
## age.dnam -0.008936 0.002954 -3.025 0.00252 **
## sexm 0.039235 0.018108 2.167 0.03041 *
## matrace.factorNon-Hispanic Black 0.277397 0.026833 10.338 < 2e-16 ***
## matrace.factorHispanic 0.043612 0.030797 1.416 0.15694
## matrace.factorOther 0.073626 0.053050 1.388 0.16538
## cm1inpov 0.008217 0.004310 1.906 0.05678 .
## m1b2 0.019549 0.024587 0.795 0.42669
## Epithelial.cells -3.096543 0.188274 -16.447 < 2e-16 ***
## Leukocytes -4.829100 0.175793 -27.470 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3532 on 1531 degrees of freedom
## Multiple R-squared: 0.5489, Adjusted R-squared: 0.5459
## F-statistic: 186.3 on 10 and 1531 DF, p-value: < 2.2e-16
summary(mod)$coef[2,4]
## [1] 0.2159189
mod.a9<-lm(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="C",])
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm25.centscalestd ~ birth.pm25 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes, data = include[include$childteen == "C", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.88105 -0.23885 -0.02792 0.18658 1.40587
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.128178 0.460774 8.959 < 2e-16 ***
## birth.pm25 -0.001347 0.001898 -0.710 0.4782
## age.dnam 0.050602 0.039593 1.278 0.2016
## sexm 0.056243 0.025559 2.201 0.0281 *
## matrace.factorNon-Hispanic Black 0.287153 0.037921 7.572 1.1e-13 ***
## matrace.factorHispanic 0.030224 0.043778 0.690 0.4902
## matrace.factorOther 0.064207 0.075205 0.854 0.3935
## cm1inpov 0.012208 0.006106 1.999 0.0459 *
## m1b2 0.012192 0.034784 0.351 0.7261
## Epithelial.cells -2.796880 0.275401 -10.156 < 2e-16 ***
## Leukocytes -4.683960 0.254219 -18.425 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3474 on 738 degrees of freedom
## Multiple R-squared: 0.5377, Adjusted R-squared: 0.5314
## F-statistic: 85.82 on 10 and 738 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="T",])
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm25.centscalestd ~ birth.pm25 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes, data = include[include$childteen == "T", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.07010 -0.25322 -0.02487 0.20100 1.31323
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.3276708 0.4971293 8.705 < 2e-16 ***
## birth.pm25 -0.0007746 0.0018464 -0.419 0.675
## age.dnam 0.0349958 0.0267149 1.310 0.191
## sexm 0.0222679 0.0256993 0.866 0.386
## matrace.factorNon-Hispanic Black 0.2669193 0.0382142 6.985 6.1e-12 ***
## matrace.factorHispanic 0.0437015 0.0439575 0.994 0.320
## matrace.factorOther 0.0902787 0.0748477 1.206 0.228
## cm1inpov 0.0062972 0.0061405 1.026 0.305
## m1b2 0.0345343 0.0348705 0.990 0.322
## Epithelial.cells -3.3561291 0.2608390 -12.867 < 2e-16 ***
## Leukocytes -4.9919163 0.2453121 -20.349 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3584 on 782 degrees of freedom
## Multiple R-squared: 0.5646, Adjusted R-squared: 0.559
## F-statistic: 101.4 on 10 and 782 DF, p-value: < 2.2e-16
output$IQRcoef.cs[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.cs[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.cs[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.cs[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include)
summary(mod)
##
## Call:
## lm(formula = peg.pm10.centscalestd ~ birth.pm10 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes, data = include)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.51361 -0.11775 -0.02182 0.09471 1.58211
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.831740 0.113196 7.348 3.39e-13 ***
## birth.pm10 -0.004009 0.001796 -2.232 0.0258 *
## age.dnam 0.007468 0.001623 4.600 4.60e-06 ***
## sexm 0.015967 0.009902 1.612 0.1071
## matrace.factorNon-Hispanic Black -0.009984 0.014414 -0.693 0.4886
## matrace.factorHispanic -0.031905 0.017298 -1.844 0.0653 .
## matrace.factorOther -0.065540 0.029189 -2.245 0.0249 *
## cm1inpov -0.002311 0.002341 -0.987 0.3239
## m1b2 -0.011956 0.013660 -0.875 0.3816
## Epithelial.cells -0.152903 0.103410 -1.479 0.1395
## Leukocytes -0.912124 0.096498 -9.452 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1853 on 1414 degrees of freedom
## (117 observations deleted due to missingness)
## Multiple R-squared: 0.3139, Adjusted R-squared: 0.3091
## F-statistic: 64.7 on 10 and 1414 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="C",])
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm10.centscalestd ~ birth.pm10 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes, data = include[include$childteen == "C", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49250 -0.11919 -0.01830 0.09186 1.46095
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.716e-01 2.703e-01 2.485 0.0132 *
## birth.pm10 -1.462e-03 2.594e-03 -0.563 0.5733
## age.dnam 8.963e-05 2.386e-02 0.004 0.9970
## sexm 1.515e-02 1.442e-02 1.050 0.2940
## matrace.factorNon-Hispanic Black 1.451e-02 2.101e-02 0.691 0.4901
## matrace.factorHispanic 1.855e-03 2.519e-02 0.074 0.9413
## matrace.factorOther -4.722e-02 4.314e-02 -1.095 0.2740
## cm1inpov -1.634e-03 3.421e-03 -0.478 0.6330
## m1b2 -3.175e-02 1.993e-02 -1.593 0.1117
## Epithelial.cells 4.501e-02 1.551e-01 0.290 0.7717
## Leukocytes -7.221e-01 1.428e-01 -5.057 5.49e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.188 on 679 degrees of freedom
## (59 observations deleted due to missingness)
## Multiple R-squared: 0.2444, Adjusted R-squared: 0.2333
## F-statistic: 21.96 on 10 and 679 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="T",])
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm10.centscalestd ~ birth.pm10 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes, data = include[include$childteen == "T", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.45742 -0.11813 -0.01366 0.09609 1.60613
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.756329 0.296373 2.552 0.01092 *
## birth.pm10 -0.007128 0.002523 -2.826 0.00485 **
## age.dnam 0.027182 0.017076 1.592 0.11186
## sexm 0.016387 0.013649 1.201 0.23029
## matrace.factorNon-Hispanic Black -0.033345 0.019872 -1.678 0.09378 .
## matrace.factorHispanic -0.065824 0.023850 -2.760 0.00593 **
## matrace.factorOther -0.080313 0.039632 -2.026 0.04309 *
## cm1inpov -0.002926 0.003226 -0.907 0.36475
## m1b2 0.006058 0.018744 0.323 0.74664
## Epithelial.cells -0.334108 0.139577 -2.394 0.01693 *
## Leukocytes -1.091013 0.131280 -8.311 4.69e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1826 on 724 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.352, Adjusted R-squared: 0.343
## F-statistic: 39.32 on 10 and 724 DF, p-value: < 2.2e-16
output$IQRcoef.cs[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.cs[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.cs[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.cs[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Output
output
## Exposure Age N IQRcoef.r IQRlcl.r IQRucl.r pval.r
## 1 PM2.5 All 1542 -0.026251799 -0.05949168 0.0069880783 0.12155427
## 2 PM2.5 9 749 -0.021015016 -0.06991742 0.0278873883 0.39914041
## 3 PM2.5 15 793 -0.017308406 -0.06484958 0.0302327723 0.47502386
## 4 PM10 All 1425 -0.013587089 -0.02692297 -0.0002512052 0.04584345
## 5 PM10 9 690 -0.003747442 -0.02292578 0.0154308944 0.70135034
## 6 PM10 15 735 -0.024189848 -0.04308380 -0.0052958947 0.01216875
## IQRcoef.c IQRlcl.c IQRucl.c pval.c IQRcoef.cs IQRlcl.cs
## 1 -0.026251799 -0.05949168 0.0069880783 0.12155427 -0.017181587 -0.04440525
## 2 -0.021015016 -0.06991742 0.0278873883 0.39914041 -0.014465622 -0.05448704
## 3 -0.017308406 -0.06484958 0.0302327723 0.47502386 -0.008320188 -0.04725430
## 4 -0.013587089 -0.02692297 -0.0002512052 0.04584345 -0.012923461 -0.02428282
## 5 -0.003747442 -0.02292578 0.0154308944 0.70135034 -0.004711884 -0.02113217
## 6 -0.024189848 -0.04308380 -0.0052958947 0.01216875 -0.022978486 -0.03894355
## IQRucl.cs pval.cs
## 1 0.010042071 0.215918859
## 2 0.025555800 0.478184525
## 3 0.030613925 0.674971855
## 4 -0.001564100 0.025787884
## 5 0.011708397 0.573330789
## 6 -0.007013419 0.004847766
write.csv(output, file=here("Output",paste0("FFCW_AirPoll_Std_PEG_Regression_Primary_", date, ".csv")) )
output<-data.frame(matrix(nrow=6, ncol= 15))
colnames(output) <- c("Exposure", "Age", "N", "IQRcoef.r", "IQRlcl.r", "IQRucl.r", "pval.r", "IQRcoef.c", "IQRlcl.c", "IQRucl.c", "pval.c", "IQRcoef.cs", "IQRlcl.cs", "IQRucl.cs", "pval.cs")
output$Exposure <- c(rep("PM2.5", 3), rep("PM10", 3))
output$Age <- c("All", "9", "15")
IQR(include$birth.pm25, na.rm=T)
## [1] 10.74194
IQR(include$birth.pm10, na.rm=T)
## [1] 3.223546
### Raw
mod<-lm(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm25, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age1.pm25, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.45457 -0.28999 -0.02866 0.24918 1.63847
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.1200338 0.2569811 23.815 <2e-16 ***
## birth.pm25 -0.0015071 0.0018974 -0.794 0.4271
## age.dnam -0.0075334 0.0036622 -2.057 0.0399 *
## sexm 0.0481505 0.0225181 2.138 0.0327 *
## matrace.factorNon-Hispanic Black 0.4467164 0.0332790 13.423 <2e-16 ***
## matrace.factorHispanic 0.0353149 0.0381392 0.926 0.3546
## matrace.factorOther 0.1510251 0.0666669 2.265 0.0236 *
## cm1inpov 0.0076122 0.0053265 1.429 0.1532
## m1b2 0.0436190 0.0303998 1.435 0.1515
## Epithelial.cells -3.1208299 0.2366049 -13.190 <2e-16 ***
## Leukocytes -6.2273754 0.2199940 -28.307 <2e-16 ***
## age1.pm25 -0.0004308 0.0025437 -0.169 0.8655
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4258 on 1442 degrees of freedom
## (88 observations deleted due to missingness)
## Multiple R-squared: 0.6689, Adjusted R-squared: 0.6664
## F-statistic: 264.8 on 11 and 1442 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm25, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age1.pm25, data = include[include$childteen == "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99652 -0.28614 -0.02787 0.25552 1.38105
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.2818173 0.5892193 8.964 < 2e-16 ***
## birth.pm25 -0.0009422 0.0027535 -0.342 0.7323
## age.dnam 0.0717139 0.0505174 1.420 0.1562
## sexm 0.0547257 0.0318216 1.720 0.0859 .
## matrace.factorNon-Hispanic Black 0.4519049 0.0470859 9.597 < 2e-16 ***
## matrace.factorHispanic -0.0004930 0.0545214 -0.009 0.9928
## matrace.factorOther 0.1487114 0.0950118 1.565 0.1180
## cm1inpov 0.0110326 0.0075445 1.462 0.1441
## m1b2 0.0426406 0.0431246 0.989 0.3231
## Epithelial.cells -2.9257552 0.3499135 -8.361 3.36e-16 ***
## Leukocytes -6.1380133 0.3211714 -19.111 < 2e-16 ***
## age1.pm25 -0.0010383 0.0035812 -0.290 0.7720
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4205 on 698 degrees of freedom
## (39 observations deleted due to missingness)
## Multiple R-squared: 0.6542, Adjusted R-squared: 0.6487
## F-statistic: 120 on 11 and 698 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm25, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age1.pm25, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.44032 -0.28526 -0.02869 0.24546 1.60912
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.290e+00 6.260e-01 8.452 <2e-16 ***
## birth.pm25 -5.438e-04 2.711e-03 -0.201 0.8411
## age.dnam 5.106e-02 3.350e-02 1.524 0.1279
## sexm 4.103e-02 3.205e-02 1.280 0.2009
## matrace.factorNon-Hispanic Black 4.360e-01 4.748e-02 9.183 <2e-16 ***
## matrace.factorHispanic 5.129e-02 5.453e-02 0.941 0.3472
## matrace.factorOther 1.630e-01 9.394e-02 1.735 0.0832 .
## cm1inpov 6.843e-03 7.602e-03 0.900 0.3683
## m1b2 5.176e-02 4.308e-02 1.202 0.2299
## Epithelial.cells -3.306e+00 3.259e-01 -10.146 <2e-16 ***
## Leukocytes -6.336e+00 3.059e-01 -20.713 <2e-16 ***
## age1.pm25 9.181e-05 3.627e-03 0.025 0.9798
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4318 on 732 degrees of freedom
## (49 observations deleted due to missingness)
## Multiple R-squared: 0.6836, Adjusted R-squared: 0.6788
## F-statistic: 143.8 on 11 and 732 DF, p-value: < 2.2e-16
output$N[1:3] <- c(nrow(model.frame(mod)), nrow(model.frame(mod.a9)), nrow(model.frame(mod.a15)))
output$IQRcoef.r[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.r[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.r[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.r[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm10, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age1.pm10, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.66580 -0.14005 -0.01082 0.12195 1.16239
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.5376054 0.1396473 25.332 < 2e-16 ***
## birth.pm10 -0.0069373 0.0028710 -2.416 0.01581 *
## age.dnam 0.0052423 0.0019649 2.668 0.00772 **
## sexm 0.0260678 0.0120074 2.171 0.03011 *
## matrace.factorNon-Hispanic Black 0.0003462 0.0173743 0.020 0.98410
## matrace.factorHispanic -0.0303513 0.0210471 -1.442 0.14952
## matrace.factorOther -0.0609405 0.0357689 -1.704 0.08867 .
## cm1inpov -0.0033609 0.0028034 -1.199 0.23080
## m1b2 -0.0126966 0.0164759 -0.771 0.44107
## Epithelial.cells -0.6445176 0.1265619 -5.093 4.04e-07 ***
## Leukocytes -3.5732882 0.1177538 -30.345 < 2e-16 ***
## age1.pm10 0.0033933 0.0030477 1.113 0.26574
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.218 on 1330 degrees of freedom
## (200 observations deleted due to missingness)
## Multiple R-squared: 0.8132, Adjusted R-squared: 0.8117
## F-statistic: 526.4 on 11 and 1330 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm10, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age1.pm10, data = include[include$childteen == "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.60815 -0.15025 -0.01492 0.11869 1.17565
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.198306 0.338641 9.445 < 2e-16 ***
## birth.pm10 -0.004441 0.004131 -1.075 0.282755
## age.dnam 0.040219 0.030175 1.333 0.183049
## sexm 0.017769 0.017417 1.020 0.308027
## matrace.factorNon-Hispanic Black 0.021987 0.025217 0.872 0.383575
## matrace.factorHispanic -0.007464 0.030626 -0.244 0.807533
## matrace.factorOther -0.040892 0.052973 -0.772 0.440438
## cm1inpov -0.002476 0.004074 -0.608 0.543466
## m1b2 -0.025919 0.024031 -1.079 0.281180
## Epithelial.cells -0.720407 0.190581 -3.780 0.000171 ***
## Leukocytes -3.592974 0.174261 -20.618 < 2e-16 ***
## age1.pm10 0.004130 0.004416 0.935 0.349953
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2208 on 641 degrees of freedom
## (96 observations deleted due to missingness)
## Multiple R-squared: 0.7747, Adjusted R-squared: 0.7708
## F-statistic: 200.4 on 11 and 641 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm10, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age1.pm10, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.63179 -0.13738 -0.00687 0.12499 1.17605
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.2330885 0.3637007 8.889 < 2e-16 ***
## birth.pm10 -0.0093624 0.0040211 -2.328 0.020190 *
## age.dnam 0.0285585 0.0208705 1.368 0.171650
## sexm 0.0326116 0.0166896 1.954 0.051112 .
## matrace.factorNon-Hispanic Black -0.0221496 0.0241286 -0.918 0.358956
## matrace.factorHispanic -0.0576458 0.0292231 -1.973 0.048946 *
## matrace.factorOther -0.0767131 0.0487136 -1.575 0.115775
## cm1inpov -0.0036416 0.0038964 -0.935 0.350326
## m1b2 0.0003721 0.0227086 0.016 0.986933
## Epithelial.cells -0.6148671 0.1709608 -3.597 0.000346 ***
## Leukocytes -3.5844191 0.1609197 -22.275 < 2e-16 ***
## age1.pm10 0.0023906 0.0042399 0.564 0.573057
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.216 on 677 degrees of freedom
## (104 observations deleted due to missingness)
## Multiple R-squared: 0.8374, Adjusted R-squared: 0.8348
## F-statistic: 317 on 11 and 677 DF, p-value: < 2.2e-16
output$N[4:6] <- c(nrow(model.frame(mod)), nrow(model.frame(mod.a9)), nrow(model.frame(mod.a15)))
output$IQRcoef.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.r[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Centered
mod<-lm(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm25, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm25.centstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age1.pm25, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.45457 -0.28999 -0.02866 0.24918 1.63847
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.1200338 0.2569811 23.815 <2e-16 ***
## birth.pm25 -0.0015071 0.0018974 -0.794 0.4271
## age.dnam -0.0075334 0.0036622 -2.057 0.0399 *
## sexm 0.0481505 0.0225181 2.138 0.0327 *
## matrace.factorNon-Hispanic Black 0.4467164 0.0332790 13.423 <2e-16 ***
## matrace.factorHispanic 0.0353149 0.0381392 0.926 0.3546
## matrace.factorOther 0.1510251 0.0666669 2.265 0.0236 *
## cm1inpov 0.0076122 0.0053265 1.429 0.1532
## m1b2 0.0436190 0.0303998 1.435 0.1515
## Epithelial.cells -3.1208299 0.2366049 -13.190 <2e-16 ***
## Leukocytes -6.2273754 0.2199940 -28.307 <2e-16 ***
## age1.pm25 -0.0004308 0.0025437 -0.169 0.8655
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4258 on 1442 degrees of freedom
## (88 observations deleted due to missingness)
## Multiple R-squared: 0.6689, Adjusted R-squared: 0.6664
## F-statistic: 264.8 on 11 and 1442 DF, p-value: < 2.2e-16
summary(mod)$coef[2,4]
## [1] 0.4271485
mod.a9<-lm(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm25, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm25.centstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age1.pm25, data = include[include$childteen == "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99652 -0.28614 -0.02787 0.25552 1.38105
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.2818173 0.5892193 8.964 < 2e-16 ***
## birth.pm25 -0.0009422 0.0027535 -0.342 0.7323
## age.dnam 0.0717139 0.0505174 1.420 0.1562
## sexm 0.0547257 0.0318216 1.720 0.0859 .
## matrace.factorNon-Hispanic Black 0.4519049 0.0470859 9.597 < 2e-16 ***
## matrace.factorHispanic -0.0004930 0.0545214 -0.009 0.9928
## matrace.factorOther 0.1487114 0.0950118 1.565 0.1180
## cm1inpov 0.0110326 0.0075445 1.462 0.1441
## m1b2 0.0426406 0.0431246 0.989 0.3231
## Epithelial.cells -2.9257552 0.3499135 -8.361 3.36e-16 ***
## Leukocytes -6.1380133 0.3211714 -19.111 < 2e-16 ***
## age1.pm25 -0.0010383 0.0035812 -0.290 0.7720
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4205 on 698 degrees of freedom
## (39 observations deleted due to missingness)
## Multiple R-squared: 0.6542, Adjusted R-squared: 0.6487
## F-statistic: 120 on 11 and 698 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm25, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm25.centstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age1.pm25, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.44032 -0.28526 -0.02869 0.24546 1.60912
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.290e+00 6.260e-01 8.452 <2e-16 ***
## birth.pm25 -5.438e-04 2.711e-03 -0.201 0.8411
## age.dnam 5.106e-02 3.350e-02 1.524 0.1279
## sexm 4.103e-02 3.205e-02 1.280 0.2009
## matrace.factorNon-Hispanic Black 4.360e-01 4.748e-02 9.183 <2e-16 ***
## matrace.factorHispanic 5.129e-02 5.453e-02 0.941 0.3472
## matrace.factorOther 1.630e-01 9.394e-02 1.735 0.0832 .
## cm1inpov 6.843e-03 7.602e-03 0.900 0.3683
## m1b2 5.176e-02 4.308e-02 1.202 0.2299
## Epithelial.cells -3.306e+00 3.259e-01 -10.146 <2e-16 ***
## Leukocytes -6.336e+00 3.059e-01 -20.713 <2e-16 ***
## age1.pm25 9.181e-05 3.627e-03 0.025 0.9798
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4318 on 732 degrees of freedom
## (49 observations deleted due to missingness)
## Multiple R-squared: 0.6836, Adjusted R-squared: 0.6788
## F-statistic: 143.8 on 11 and 732 DF, p-value: < 2.2e-16
output$IQRcoef.c[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.c[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.c[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.c[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm10, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm10.centstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age1.pm10, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.66580 -0.14005 -0.01082 0.12195 1.16239
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.5376054 0.1396473 25.332 < 2e-16 ***
## birth.pm10 -0.0069373 0.0028710 -2.416 0.01581 *
## age.dnam 0.0052423 0.0019649 2.668 0.00772 **
## sexm 0.0260678 0.0120074 2.171 0.03011 *
## matrace.factorNon-Hispanic Black 0.0003462 0.0173743 0.020 0.98410
## matrace.factorHispanic -0.0303513 0.0210471 -1.442 0.14952
## matrace.factorOther -0.0609405 0.0357689 -1.704 0.08867 .
## cm1inpov -0.0033609 0.0028034 -1.199 0.23080
## m1b2 -0.0126966 0.0164759 -0.771 0.44107
## Epithelial.cells -0.6445176 0.1265619 -5.093 4.04e-07 ***
## Leukocytes -3.5732882 0.1177538 -30.345 < 2e-16 ***
## age1.pm10 0.0033933 0.0030477 1.113 0.26574
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.218 on 1330 degrees of freedom
## (200 observations deleted due to missingness)
## Multiple R-squared: 0.8132, Adjusted R-squared: 0.8117
## F-statistic: 526.4 on 11 and 1330 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm10, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm10.centstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age1.pm10, data = include[include$childteen == "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.60815 -0.15025 -0.01492 0.11869 1.17565
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.198306 0.338641 9.445 < 2e-16 ***
## birth.pm10 -0.004441 0.004131 -1.075 0.282755
## age.dnam 0.040219 0.030175 1.333 0.183049
## sexm 0.017769 0.017417 1.020 0.308027
## matrace.factorNon-Hispanic Black 0.021987 0.025217 0.872 0.383575
## matrace.factorHispanic -0.007464 0.030626 -0.244 0.807533
## matrace.factorOther -0.040892 0.052973 -0.772 0.440438
## cm1inpov -0.002476 0.004074 -0.608 0.543466
## m1b2 -0.025919 0.024031 -1.079 0.281180
## Epithelial.cells -0.720407 0.190581 -3.780 0.000171 ***
## Leukocytes -3.592974 0.174261 -20.618 < 2e-16 ***
## age1.pm10 0.004130 0.004416 0.935 0.349953
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2208 on 641 degrees of freedom
## (96 observations deleted due to missingness)
## Multiple R-squared: 0.7747, Adjusted R-squared: 0.7708
## F-statistic: 200.4 on 11 and 641 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm10, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm10.centstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age1.pm10, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.63179 -0.13738 -0.00687 0.12499 1.17605
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.2330885 0.3637007 8.889 < 2e-16 ***
## birth.pm10 -0.0093624 0.0040211 -2.328 0.020190 *
## age.dnam 0.0285585 0.0208705 1.368 0.171650
## sexm 0.0326116 0.0166896 1.954 0.051112 .
## matrace.factorNon-Hispanic Black -0.0221496 0.0241286 -0.918 0.358956
## matrace.factorHispanic -0.0576458 0.0292231 -1.973 0.048946 *
## matrace.factorOther -0.0767131 0.0487136 -1.575 0.115775
## cm1inpov -0.0036416 0.0038964 -0.935 0.350326
## m1b2 0.0003721 0.0227086 0.016 0.986933
## Epithelial.cells -0.6148671 0.1709608 -3.597 0.000346 ***
## Leukocytes -3.5844191 0.1609197 -22.275 < 2e-16 ***
## age1.pm10 0.0023906 0.0042399 0.564 0.573057
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.216 on 677 degrees of freedom
## (104 observations deleted due to missingness)
## Multiple R-squared: 0.8374, Adjusted R-squared: 0.8348
## F-statistic: 317 on 11 and 677 DF, p-value: < 2.2e-16
output$IQRcoef.c[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.c[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.c[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.c[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Centered & Scaled
mod<-lm(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm25, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm25.centscalestd ~ birth.pm25 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + age1.pm25, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.07142 -0.23587 -0.02596 0.20037 1.37240
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.7731008 0.2106251 22.662 <2e-16 ***
## birth.pm25 -0.0005382 0.0015551 -0.346 0.7293
## age.dnam -0.0095454 0.0030016 -3.180 0.0015 **
## sexm 0.0368750 0.0184561 1.998 0.0459 *
## matrace.factorNon-Hispanic Black 0.2708927 0.0272759 9.932 <2e-16 ***
## matrace.factorHispanic 0.0287007 0.0312594 0.918 0.3587
## matrace.factorOther 0.0969381 0.0546411 1.774 0.0763 .
## cm1inpov 0.0069474 0.0043656 1.591 0.1117
## m1b2 0.0347672 0.0249161 1.395 0.1631
## Epithelial.cells -2.9776961 0.1939245 -15.355 <2e-16 ***
## Leukocytes -4.7500121 0.1803100 -26.344 <2e-16 ***
## age1.pm25 -0.0015921 0.0020849 -0.764 0.4452
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.349 on 1442 degrees of freedom
## (88 observations deleted due to missingness)
## Multiple R-squared: 0.549, Adjusted R-squared: 0.5455
## F-statistic: 159.6 on 11 and 1442 DF, p-value: < 2.2e-16
summary(mod)$coef[2,4]
## [1] 0.7293468
mod.a9<-lm(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm25, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm25.centscalestd ~ birth.pm25 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + age1.pm25, data = include[include$childteen ==
## "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.90143 -0.22864 -0.03509 0.18074 1.38416
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.0401353 0.4816352 8.388 2.73e-16 ***
## birth.pm25 -0.0002617 0.0022507 -0.116 0.9075
## age.dnam 0.0579659 0.0412936 1.404 0.1608
## sexm 0.0521633 0.0260114 2.005 0.0453 *
## matrace.factorNon-Hispanic Black 0.2845253 0.0384886 7.392 4.14e-13 ***
## matrace.factorHispanic 0.0128858 0.0445665 0.289 0.7726
## matrace.factorOther 0.0915052 0.0776638 1.178 0.2391
## cm1inpov 0.0103898 0.0061670 1.685 0.0925 .
## m1b2 0.0272370 0.0352506 0.773 0.4400
## Epithelial.cells -2.7715383 0.2860236 -9.690 < 2e-16 ***
## Leukocytes -4.6560772 0.2625295 -17.735 < 2e-16 ***
## age1.pm25 -0.0020489 0.0029273 -0.700 0.4842
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3437 on 698 degrees of freedom
## (39 observations deleted due to missingness)
## Multiple R-squared: 0.5427, Adjusted R-squared: 0.5355
## F-statistic: 75.31 on 11 and 698 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm25, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm25.centscalestd ~ birth.pm25 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + age1.pm25, data = include[include$childteen ==
## "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.06953 -0.24448 -0.01992 0.19661 1.33303
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.1977732 0.5139527 8.168 1.38e-15 ***
## birth.pm25 0.0004206 0.0022259 0.189 0.850
## age.dnam 0.0327570 0.0275081 1.191 0.234
## sexm 0.0220033 0.0263187 0.836 0.403
## matrace.factorNon-Hispanic Black 0.2548602 0.0389853 6.537 1.17e-10 ***
## matrace.factorHispanic 0.0301029 0.0447731 0.672 0.502
## matrace.factorOther 0.1100420 0.0771275 1.427 0.154
## cm1inpov 0.0056298 0.0062419 0.902 0.367
## m1b2 0.0473426 0.0353708 1.338 0.181
## Epithelial.cells -3.1592838 0.2675486 -11.808 < 2e-16 ***
## Leukocytes -4.8557286 0.2511693 -19.332 < 2e-16 ***
## age1.pm25 -0.0011846 0.0029784 -0.398 0.691
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3545 on 732 degrees of freedom
## (49 observations deleted due to missingness)
## Multiple R-squared: 0.5599, Adjusted R-squared: 0.5533
## F-statistic: 84.67 on 11 and 732 DF, p-value: < 2.2e-16
output$IQRcoef.cs[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.cs[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.cs[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.cs[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm10, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm10.centscalestd ~ birth.pm10 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + age1.pm10, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.51678 -0.11799 -0.01851 0.09456 1.58212
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.843360 0.119095 7.081 2.30e-12 ***
## birth.pm10 -0.006186 0.002448 -2.526 0.0116 *
## age.dnam 0.007383 0.001676 4.406 1.14e-05 ***
## sexm 0.014233 0.010240 1.390 0.1648
## matrace.factorNon-Hispanic Black -0.014526 0.014817 -0.980 0.3271
## matrace.factorHispanic -0.038088 0.017950 -2.122 0.0340 *
## matrace.factorOther -0.060204 0.030505 -1.974 0.0486 *
## cm1inpov -0.003402 0.002391 -1.423 0.1550
## m1b2 -0.010331 0.014051 -0.735 0.4623
## Epithelial.cells -0.174514 0.107935 -1.617 0.1062
## Leukocytes -0.923087 0.100424 -9.192 < 2e-16 ***
## age1.pm10 0.002663 0.002599 1.025 0.3057
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1859 on 1330 degrees of freedom
## (200 observations deleted due to missingness)
## Multiple R-squared: 0.3, Adjusted R-squared: 0.2942
## F-statistic: 51.81 on 11 and 1330 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm10, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm10.centscalestd ~ birth.pm10 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + age1.pm10, data = include[include$childteen ==
## "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.50052 -0.11915 -0.01944 0.09313 1.45952
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.668155 0.290200 2.302 0.0216 *
## birth.pm10 -0.004247 0.003540 -1.200 0.2307
## age.dnam 0.006249 0.025858 0.242 0.8091
## sexm 0.013479 0.014926 0.903 0.3668
## matrace.factorNon-Hispanic Black 0.012517 0.021610 0.579 0.5627
## matrace.factorHispanic -0.004720 0.026246 -0.180 0.8573
## matrace.factorOther -0.037103 0.045396 -0.817 0.4140
## cm1inpov -0.002716 0.003491 -0.778 0.4368
## m1b2 -0.025358 0.020593 -1.231 0.2186
## Epithelial.cells -0.038016 0.163319 -0.233 0.8160
## Leukocytes -0.782883 0.149333 -5.243 2.15e-07 ***
## age1.pm10 0.003332 0.003784 0.880 0.3789
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1892 on 641 degrees of freedom
## (96 observations deleted due to missingness)
## Multiple R-squared: 0.2328, Adjusted R-squared: 0.2196
## F-statistic: 17.68 on 11 and 641 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm10, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm10.centscalestd ~ birth.pm10 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + age1.pm10, data = include[include$childteen ==
## "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.46770 -0.11734 -0.01285 0.10117 1.60246
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.768462 0.308510 2.491 0.01298 *
## birth.pm10 -0.008316 0.003411 -2.438 0.01503 *
## age.dnam 0.024339 0.017703 1.375 0.16964
## sexm 0.014850 0.014157 1.049 0.29458
## matrace.factorNon-Hispanic Black -0.041162 0.020467 -2.011 0.04471 *
## matrace.factorHispanic -0.072100 0.024789 -2.909 0.00375 **
## matrace.factorOther -0.080095 0.041321 -1.938 0.05300 .
## cm1inpov -0.003942 0.003305 -1.193 0.23335
## m1b2 0.002992 0.019263 0.155 0.87659
## Epithelial.cells -0.295340 0.145018 -2.037 0.04208 *
## Leukocytes -1.054264 0.136501 -7.724 4.08e-14 ***
## age1.pm10 0.001698 0.003597 0.472 0.63701
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1832 on 677 degrees of freedom
## (104 observations deleted due to missingness)
## Multiple R-squared: 0.3347, Adjusted R-squared: 0.3239
## F-statistic: 30.96 on 11 and 677 DF, p-value: < 2.2e-16
output$IQRcoef.cs[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.cs[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.cs[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.cs[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Output
output
## Exposure Age N IQRcoef.r IQRlcl.r IQRucl.r pval.r
## 1 PM2.5 All 1454 -0.016189337 -0.05617041 0.023791737 0.42714851
## 2 PM2.5 9 710 -0.010120701 -0.06819248 0.047951074 0.73232278
## 3 PM2.5 15 744 -0.005841499 -0.06301159 0.051328591 0.84107022
## 4 PM10 All 1342 -0.022362783 -0.04051847 -0.004207094 0.01581171
## 5 PM10 9 653 -0.014315321 -0.04046339 0.011832746 0.28275492
## 6 PM10 15 689 -0.030180213 -0.05563138 -0.004729051 0.02018953
## IQRcoef.c IQRlcl.c IQRucl.c pval.c IQRcoef.cs IQRlcl.cs
## 1 -0.016189337 -0.05617041 0.023791737 0.42714851 -0.005781016 -0.03855003
## 2 -0.010120701 -0.06819248 0.047951074 0.73232278 -0.002811276 -0.05027987
## 3 -0.005841499 -0.06301159 0.051328591 0.84107022 0.004518122 -0.04242230
## 4 -0.022362783 -0.04051847 -0.004207094 0.01581171 -0.019939726 -0.03542339
## 5 -0.014315321 -0.04046339 0.011832746 0.28275492 -0.013690741 -0.03609845
## 6 -0.030180213 -0.05563138 -0.004729051 0.02018953 -0.026805827 -0.04839487
## IQRucl.cs pval.cs
## 1 0.026988001 0.72934685
## 2 0.044657318 0.90746538
## 3 0.051458545 0.85017389
## 4 -0.004456063 0.01164158
## 5 0.008716970 0.23067156
## 6 -0.005216781 0.01502792
write.csv(output, file=here("Output",paste0("FFCW_AirPoll_Std_PEG_Regression_Sens_Age1_", date, ".csv")) )
output<-data.frame(matrix(nrow=6, ncol= 15))
colnames(output) <- c("Exposure", "Age", "N", "IQRcoef.r", "IQRlcl.r", "IQRucl.r", "pval.r", "IQRcoef.c", "IQRlcl.c", "IQRucl.c", "pval.c", "IQRcoef.cs", "IQRlcl.cs", "IQRucl.cs", "pval.cs")
output$Exposure <- c(rep("PM2.5", 3), rep("PM10", 3))
output$Age <- c("All", "9", "15")
IQR(include$birth.pm25, na.rm=T)
## [1] 10.74194
IQR(include$birth.pm10, na.rm=T)
## [1] 3.223546
### Raw
mod<-lm(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm25, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age3.pm25, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.42781 -0.30304 -0.03394 0.24447 1.60793
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.164240 0.262369 23.495 < 2e-16 ***
## birth.pm25 -0.003190 0.002038 -1.565 0.11780
## age.dnam -0.006828 0.003813 -1.791 0.07352 .
## sexm 0.068065 0.023429 2.905 0.00373 **
## matrace.factorNon-Hispanic Black 0.439514 0.035663 12.324 < 2e-16 ***
## matrace.factorHispanic 0.037948 0.040287 0.942 0.34639
## matrace.factorOther 0.114772 0.067114 1.710 0.08747 .
## cm1inpov 0.007832 0.005545 1.412 0.15804
## m1b2 0.016962 0.031869 0.532 0.59465
## Epithelial.cells -3.196061 0.243035 -13.151 < 2e-16 ***
## Leukocytes -6.247030 0.226190 -27.618 < 2e-16 ***
## age3.pm25 0.001717 0.001879 0.914 0.36109
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4351 on 1393 degrees of freedom
## (137 observations deleted due to missingness)
## Multiple R-squared: 0.6655, Adjusted R-squared: 0.6629
## F-statistic: 252 on 11 and 1393 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm25, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age3.pm25, data = include[include$childteen == "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.96909 -0.29609 -0.03167 0.25482 1.37356
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.2297071 0.6099248 8.574 < 2e-16 ***
## birth.pm25 -0.0015381 0.0029785 -0.516 0.6057
## age.dnam 0.0873122 0.0521142 1.675 0.0943 .
## sexm 0.0803807 0.0331566 2.424 0.0156 *
## matrace.factorNon-Hispanic Black 0.4479802 0.0505202 8.867 < 2e-16 ***
## matrace.factorHispanic 0.0079680 0.0576371 0.138 0.8901
## matrace.factorOther 0.1154361 0.0955654 1.208 0.2275
## cm1inpov 0.0122369 0.0078849 1.552 0.1211
## m1b2 0.0181029 0.0452845 0.400 0.6895
## Epithelial.cells -2.9994094 0.3595145 -8.343 4.11e-16 ***
## Leukocytes -6.2154867 0.3292929 -18.875 < 2e-16 ***
## age3.pm25 0.0001656 0.0026597 0.062 0.9504
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4294 on 672 degrees of freedom
## (65 observations deleted due to missingness)
## Multiple R-squared: 0.6474, Adjusted R-squared: 0.6416
## F-statistic: 112.2 on 11 and 672 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm25, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age3.pm25, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.41407 -0.29311 -0.03333 0.23867 1.57063
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.241821 0.635801 8.244 8.03e-16 ***
## birth.pm25 -0.002495 0.002918 -0.855 0.393
## age.dnam 0.055216 0.034257 1.612 0.107
## sexm 0.053798 0.033204 1.620 0.106
## matrace.factorNon-Hispanic Black 0.426425 0.050718 8.408 2.29e-16 ***
## matrace.factorHispanic 0.046981 0.057282 0.820 0.412
## matrace.factorOther 0.124525 0.094470 1.318 0.188
## cm1inpov 0.006580 0.007888 0.834 0.405
## m1b2 0.027412 0.045081 0.608 0.543
## Epithelial.cells -3.356160 0.334541 -10.032 < 2e-16 ***
## Leukocytes -6.312358 0.314007 -20.103 < 2e-16 ***
## age3.pm25 0.002453 0.002691 0.912 0.362
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4407 on 709 degrees of freedom
## (72 observations deleted due to missingness)
## Multiple R-squared: 0.6833, Adjusted R-squared: 0.6784
## F-statistic: 139.1 on 11 and 709 DF, p-value: < 2.2e-16
output$N[1:3] <- c(nrow(model.frame(mod)), nrow(model.frame(mod.a9)), nrow(model.frame(mod.a15)))
output$IQRcoef.r[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.r[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.r[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.r[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm10, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age3.pm10, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.63808 -0.14440 -0.01354 0.12343 1.17331
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.5223007 0.1404187 25.084 < 2e-16 ***
## birth.pm10 -0.0055738 0.0029378 -1.897 0.0580 .
## age.dnam 0.0055365 0.0020116 2.752 0.0060 **
## sexm 0.0314583 0.0123116 2.555 0.0107 *
## matrace.factorNon-Hispanic Black -0.0036982 0.0179286 -0.206 0.8366
## matrace.factorHispanic -0.0343640 0.0217333 -1.581 0.1141
## matrace.factorOther -0.0677908 0.0355550 -1.907 0.0568 .
## cm1inpov -0.0026101 0.0028866 -0.904 0.3660
## m1b2 -0.0128951 0.0169647 -0.760 0.4473
## Epithelial.cells -0.6426241 0.1283507 -5.007 6.3e-07 ***
## Leukocytes -3.5440795 0.1193826 -29.687 < 2e-16 ***
## age3.pm10 0.0006073 0.0027401 0.222 0.8246
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.22 on 1297 degrees of freedom
## (233 observations deleted due to missingness)
## Multiple R-squared: 0.8176, Adjusted R-squared: 0.816
## F-statistic: 528.4 on 11 and 1297 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm10, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age3.pm10, data = include[include$childteen == "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.59862 -0.15550 -0.01583 0.12399 1.19183
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.0984444 0.3414566 9.074 < 2e-16 ***
## birth.pm10 -0.0011074 0.0042188 -0.262 0.793027
## age.dnam 0.0427722 0.0304523 1.405 0.160650
## sexm 0.0183366 0.0177737 1.032 0.302626
## matrace.factorNon-Hispanic Black 0.0195534 0.0259802 0.753 0.451959
## matrace.factorHispanic -0.0160700 0.0315094 -0.510 0.610226
## matrace.factorOther -0.0478593 0.0522753 -0.916 0.360271
## cm1inpov -0.0007079 0.0041830 -0.169 0.865662
## m1b2 -0.0211416 0.0246531 -0.858 0.391464
## Epithelial.cells -0.6373803 0.1925243 -3.311 0.000985 ***
## Leukocytes -3.5036984 0.1753347 -19.983 < 2e-16 ***
## age3.pm10 -0.0013604 0.0040043 -0.340 0.734166
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2215 on 623 degrees of freedom
## (114 observations deleted due to missingness)
## Multiple R-squared: 0.7728, Adjusted R-squared: 0.7687
## F-statistic: 192.6 on 11 and 623 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm10, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age3.pm10, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.5978 -0.1444 -0.0099 0.1274 1.1804
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.089361 0.369619 8.358 3.75e-16 ***
## birth.pm10 -0.010652 0.004122 -2.584 0.00998 **
## age.dnam 0.041063 0.021488 1.911 0.05644 .
## sexm 0.042399 0.017146 2.473 0.01366 *
## matrace.factorNon-Hispanic Black -0.027266 0.024912 -1.094 0.27414
## matrace.factorHispanic -0.056172 0.030174 -1.862 0.06310 .
## matrace.factorOther -0.081835 0.048631 -1.683 0.09289 .
## cm1inpov -0.003671 0.004013 -0.915 0.36058
## m1b2 -0.005638 0.023420 -0.241 0.80982
## Epithelial.cells -0.683140 0.174193 -3.922 9.71e-05 ***
## Leukocytes -3.608341 0.163930 -22.012 < 2e-16 ***
## age3.pm10 0.002886 0.003792 0.761 0.44691
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2188 on 662 degrees of freedom
## (119 observations deleted due to missingness)
## Multiple R-squared: 0.8441, Adjusted R-squared: 0.8415
## F-statistic: 325.8 on 11 and 662 DF, p-value: < 2.2e-16
output$N[4:6] <- c(nrow(model.frame(mod)), nrow(model.frame(mod.a9)), nrow(model.frame(mod.a15)))
output$IQRcoef.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.r[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Centered
mod<-lm(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm25, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm25.centstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age3.pm25, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.42781 -0.30304 -0.03394 0.24447 1.60793
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.164240 0.262369 23.495 < 2e-16 ***
## birth.pm25 -0.003190 0.002038 -1.565 0.11780
## age.dnam -0.006828 0.003813 -1.791 0.07352 .
## sexm 0.068065 0.023429 2.905 0.00373 **
## matrace.factorNon-Hispanic Black 0.439514 0.035663 12.324 < 2e-16 ***
## matrace.factorHispanic 0.037948 0.040287 0.942 0.34639
## matrace.factorOther 0.114772 0.067114 1.710 0.08747 .
## cm1inpov 0.007832 0.005545 1.412 0.15804
## m1b2 0.016962 0.031869 0.532 0.59465
## Epithelial.cells -3.196061 0.243035 -13.151 < 2e-16 ***
## Leukocytes -6.247030 0.226190 -27.618 < 2e-16 ***
## age3.pm25 0.001717 0.001879 0.914 0.36109
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4351 on 1393 degrees of freedom
## (137 observations deleted due to missingness)
## Multiple R-squared: 0.6655, Adjusted R-squared: 0.6629
## F-statistic: 252 on 11 and 1393 DF, p-value: < 2.2e-16
summary(mod)$coef[2,4]
## [1] 0.1178041
mod.a9<-lm(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm25, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm25.centstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age3.pm25, data = include[include$childteen == "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.96909 -0.29609 -0.03167 0.25482 1.37356
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.2297071 0.6099248 8.574 < 2e-16 ***
## birth.pm25 -0.0015381 0.0029785 -0.516 0.6057
## age.dnam 0.0873122 0.0521142 1.675 0.0943 .
## sexm 0.0803807 0.0331566 2.424 0.0156 *
## matrace.factorNon-Hispanic Black 0.4479802 0.0505202 8.867 < 2e-16 ***
## matrace.factorHispanic 0.0079680 0.0576371 0.138 0.8901
## matrace.factorOther 0.1154361 0.0955654 1.208 0.2275
## cm1inpov 0.0122369 0.0078849 1.552 0.1211
## m1b2 0.0181029 0.0452845 0.400 0.6895
## Epithelial.cells -2.9994094 0.3595145 -8.343 4.11e-16 ***
## Leukocytes -6.2154867 0.3292929 -18.875 < 2e-16 ***
## age3.pm25 0.0001656 0.0026597 0.062 0.9504
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4294 on 672 degrees of freedom
## (65 observations deleted due to missingness)
## Multiple R-squared: 0.6474, Adjusted R-squared: 0.6416
## F-statistic: 112.2 on 11 and 672 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm25, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm25.centstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age3.pm25, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.41407 -0.29311 -0.03333 0.23867 1.57063
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.241821 0.635801 8.244 8.03e-16 ***
## birth.pm25 -0.002495 0.002918 -0.855 0.393
## age.dnam 0.055216 0.034257 1.612 0.107
## sexm 0.053798 0.033204 1.620 0.106
## matrace.factorNon-Hispanic Black 0.426425 0.050718 8.408 2.29e-16 ***
## matrace.factorHispanic 0.046981 0.057282 0.820 0.412
## matrace.factorOther 0.124525 0.094470 1.318 0.188
## cm1inpov 0.006580 0.007888 0.834 0.405
## m1b2 0.027412 0.045081 0.608 0.543
## Epithelial.cells -3.356160 0.334541 -10.032 < 2e-16 ***
## Leukocytes -6.312358 0.314007 -20.103 < 2e-16 ***
## age3.pm25 0.002453 0.002691 0.912 0.362
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4407 on 709 degrees of freedom
## (72 observations deleted due to missingness)
## Multiple R-squared: 0.6833, Adjusted R-squared: 0.6784
## F-statistic: 139.1 on 11 and 709 DF, p-value: < 2.2e-16
output$IQRcoef.c[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.c[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.c[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.c[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm10, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm10.centstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age3.pm10, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.63808 -0.14440 -0.01354 0.12343 1.17331
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.5223007 0.1404187 25.084 < 2e-16 ***
## birth.pm10 -0.0055738 0.0029378 -1.897 0.0580 .
## age.dnam 0.0055365 0.0020116 2.752 0.0060 **
## sexm 0.0314583 0.0123116 2.555 0.0107 *
## matrace.factorNon-Hispanic Black -0.0036982 0.0179286 -0.206 0.8366
## matrace.factorHispanic -0.0343640 0.0217333 -1.581 0.1141
## matrace.factorOther -0.0677908 0.0355550 -1.907 0.0568 .
## cm1inpov -0.0026101 0.0028866 -0.904 0.3660
## m1b2 -0.0128951 0.0169647 -0.760 0.4473
## Epithelial.cells -0.6426241 0.1283507 -5.007 6.3e-07 ***
## Leukocytes -3.5440795 0.1193826 -29.687 < 2e-16 ***
## age3.pm10 0.0006073 0.0027401 0.222 0.8246
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.22 on 1297 degrees of freedom
## (233 observations deleted due to missingness)
## Multiple R-squared: 0.8176, Adjusted R-squared: 0.816
## F-statistic: 528.4 on 11 and 1297 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm10, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm10.centstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age3.pm10, data = include[include$childteen == "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.59862 -0.15550 -0.01583 0.12399 1.19183
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.0984444 0.3414566 9.074 < 2e-16 ***
## birth.pm10 -0.0011074 0.0042188 -0.262 0.793027
## age.dnam 0.0427722 0.0304523 1.405 0.160650
## sexm 0.0183366 0.0177737 1.032 0.302626
## matrace.factorNon-Hispanic Black 0.0195534 0.0259802 0.753 0.451959
## matrace.factorHispanic -0.0160700 0.0315094 -0.510 0.610226
## matrace.factorOther -0.0478593 0.0522753 -0.916 0.360271
## cm1inpov -0.0007079 0.0041830 -0.169 0.865662
## m1b2 -0.0211416 0.0246531 -0.858 0.391464
## Epithelial.cells -0.6373803 0.1925243 -3.311 0.000985 ***
## Leukocytes -3.5036984 0.1753347 -19.983 < 2e-16 ***
## age3.pm10 -0.0013604 0.0040043 -0.340 0.734166
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2215 on 623 degrees of freedom
## (114 observations deleted due to missingness)
## Multiple R-squared: 0.7728, Adjusted R-squared: 0.7687
## F-statistic: 192.6 on 11 and 623 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm10, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm10.centstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## age3.pm10, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.5978 -0.1444 -0.0099 0.1274 1.1804
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.089361 0.369619 8.358 3.75e-16 ***
## birth.pm10 -0.010652 0.004122 -2.584 0.00998 **
## age.dnam 0.041063 0.021488 1.911 0.05644 .
## sexm 0.042399 0.017146 2.473 0.01366 *
## matrace.factorNon-Hispanic Black -0.027266 0.024912 -1.094 0.27414
## matrace.factorHispanic -0.056172 0.030174 -1.862 0.06310 .
## matrace.factorOther -0.081835 0.048631 -1.683 0.09289 .
## cm1inpov -0.003671 0.004013 -0.915 0.36058
## m1b2 -0.005638 0.023420 -0.241 0.80982
## Epithelial.cells -0.683140 0.174193 -3.922 9.71e-05 ***
## Leukocytes -3.608341 0.163930 -22.012 < 2e-16 ***
## age3.pm10 0.002886 0.003792 0.761 0.44691
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2188 on 662 degrees of freedom
## (119 observations deleted due to missingness)
## Multiple R-squared: 0.8441, Adjusted R-squared: 0.8415
## F-statistic: 325.8 on 11 and 662 DF, p-value: < 2.2e-16
output$IQRcoef.c[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.c[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.c[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.c[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Centered & Scaled
mod<-lm(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm25, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm25.centscalestd ~ birth.pm25 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + age3.pm25, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.04097 -0.24889 -0.02739 0.20479 1.40252
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.7840483 0.2147519 22.277 < 2e-16 ***
## birth.pm25 -0.0020194 0.0016684 -1.210 0.22633
## age.dnam -0.0090969 0.0031208 -2.915 0.00361 **
## sexm 0.0532416 0.0191772 2.776 0.00557 **
## matrace.factorNon-Hispanic Black 0.2674298 0.0291902 9.162 < 2e-16 ***
## matrace.factorHispanic 0.0342985 0.0329750 1.040 0.29846
## matrace.factorOther 0.0631528 0.0549333 1.150 0.25049
## cm1inpov 0.0077335 0.0045388 1.704 0.08863 .
## m1b2 0.0112634 0.0260852 0.432 0.66596
## Epithelial.cells -2.9926796 0.1989265 -15.044 < 2e-16 ***
## Leukocytes -4.7441477 0.1851391 -25.625 < 2e-16 ***
## age3.pm25 0.0004215 0.0015380 0.274 0.78406
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3561 on 1393 degrees of freedom
## (137 observations deleted due to missingness)
## Multiple R-squared: 0.5451, Adjusted R-squared: 0.5415
## F-statistic: 151.7 on 11 and 1393 DF, p-value: < 2.2e-16
summary(mod)$coef[2,4]
## [1] 0.2263328
mod.a9<-lm(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm25, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm25.centscalestd ~ birth.pm25 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + age3.pm25, data = include[include$childteen ==
## "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.87294 -0.24427 -0.02619 0.19119 1.41898
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.9227365 0.4999197 7.847 1.69e-14 ***
## birth.pm25 -0.0007144 0.0024413 -0.293 0.76990
## age.dnam 0.0654955 0.0427149 1.533 0.12567
## sexm 0.0740241 0.0271765 2.724 0.00662 **
## matrace.factorNon-Hispanic Black 0.2764441 0.0414085 6.676 5.14e-11 ***
## matrace.factorHispanic 0.0184707 0.0472418 0.391 0.69593
## matrace.factorOther 0.0539007 0.0783293 0.688 0.49161
## cm1inpov 0.0115888 0.0064628 1.793 0.07340 .
## m1b2 0.0068607 0.0371170 0.185 0.85341
## Epithelial.cells -2.7151331 0.2946730 -9.214 < 2e-16 ***
## Leukocytes -4.6089421 0.2699021 -17.076 < 2e-16 ***
## age3.pm25 -0.0006915 0.0021800 -0.317 0.75119
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.352 on 672 degrees of freedom
## (65 observations deleted due to missingness)
## Multiple R-squared: 0.5298, Adjusted R-squared: 0.5221
## F-statistic: 68.84 on 11 and 672 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm25, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm25.centscalestd ~ birth.pm25 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + age3.pm25, data = include[include$childteen ==
## "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.0496 -0.2527 -0.0213 0.1972 1.3141
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.1578690 0.5193712 8.006 4.87e-15 ***
## birth.pm25 -0.0013802 0.0023839 -0.579 0.563
## age.dnam 0.0400184 0.0279836 1.430 0.153
## sexm 0.0318395 0.0271235 1.174 0.241
## matrace.factorNon-Hispanic Black 0.2555726 0.0414304 6.169 1.16e-09 ***
## matrace.factorHispanic 0.0331699 0.0467922 0.709 0.479
## matrace.factorOther 0.0801459 0.0771708 1.039 0.299
## cm1inpov 0.0062623 0.0064439 0.972 0.331
## m1b2 0.0243333 0.0368257 0.661 0.509
## Epithelial.cells -3.2221092 0.2732787 -11.791 < 2e-16 ***
## Leukocytes -4.8910617 0.2565054 -19.068 < 2e-16 ***
## age3.pm25 0.0008211 0.0021979 0.374 0.709
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.36 on 709 degrees of freedom
## (72 observations deleted due to missingness)
## Multiple R-squared: 0.5649, Adjusted R-squared: 0.5582
## F-statistic: 83.68 on 11 and 709 DF, p-value: < 2.2e-16
output$IQRcoef.cs[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.cs[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.cs[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.cs[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm10, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm10.centscalestd ~ birth.pm10 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + age3.pm10, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.51719 -0.11953 -0.02084 0.09561 1.58381
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.8358744 0.1198916 6.972 4.97e-12 ***
## birth.pm10 -0.0049344 0.0025084 -1.967 0.0494 *
## age.dnam 0.0075196 0.0017176 4.378 1.29e-05 ***
## sexm 0.0164823 0.0105119 1.568 0.1171
## matrace.factorNon-Hispanic Black -0.0174400 0.0153077 -1.139 0.2548
## matrace.factorHispanic -0.0409818 0.0185562 -2.209 0.0274 *
## matrace.factorOther -0.0662788 0.0303574 -2.183 0.0292 *
## cm1inpov -0.0029165 0.0024646 -1.183 0.2369
## m1b2 -0.0127223 0.0144847 -0.878 0.3799
## Epithelial.cells -0.1520786 0.1095878 -1.388 0.1655
## Leukocytes -0.9024079 0.1019307 -8.853 < 2e-16 ***
## age3.pm10 0.0005452 0.0023396 0.233 0.8158
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1878 on 1297 degrees of freedom
## (233 observations deleted due to missingness)
## Multiple R-squared: 0.3084, Adjusted R-squared: 0.3025
## F-statistic: 52.58 on 11 and 1297 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm10, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm10.centscalestd ~ birth.pm10 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + age3.pm10, data = include[include$childteen ==
## "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49715 -0.11942 -0.02170 0.09196 1.46566
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.650680 0.294608 2.209 0.0276 *
## birth.pm10 -0.002581 0.003640 -0.709 0.4786
## age.dnam 0.002256 0.026274 0.086 0.9316
## sexm 0.012600 0.015335 0.822 0.4116
## matrace.factorNon-Hispanic Black 0.009871 0.022416 0.440 0.6598
## matrace.factorHispanic -0.009183 0.027186 -0.338 0.7357
## matrace.factorOther -0.044192 0.045103 -0.980 0.3276
## cm1inpov -0.001512 0.003609 -0.419 0.6754
## m1b2 -0.026641 0.021271 -1.252 0.2109
## Epithelial.cells 0.023911 0.166109 0.144 0.8856
## Leukocytes -0.721428 0.151278 -4.769 2.31e-06 ***
## age3.pm10 0.001002 0.003455 0.290 0.7719
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1911 on 623 degrees of freedom
## (114 observations deleted due to missingness)
## Multiple R-squared: 0.2264, Adjusted R-squared: 0.2127
## F-statistic: 16.57 on 11 and 623 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm10, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm10.centscalestd ~ birth.pm10 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + age3.pm10, data = include[include$childteen ==
## "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.46763 -0.11800 -0.01315 0.10458 1.60316
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.7198509 0.3122599 2.305 0.02146 *
## birth.pm10 -0.0077267 0.0034825 -2.219 0.02685 *
## age.dnam 0.0305987 0.0181533 1.686 0.09235 .
## sexm 0.0195273 0.0144853 1.348 0.17810
## matrace.factorNon-Hispanic Black -0.0440297 0.0210460 -2.092 0.03681 *
## matrace.factorHispanic -0.0732879 0.0254916 -2.875 0.00417 **
## matrace.factorOther -0.0850695 0.0410844 -2.071 0.03878 *
## cm1inpov -0.0041726 0.0033902 -1.231 0.21884
## m1b2 -0.0006218 0.0197856 -0.031 0.97494
## Epithelial.cells -0.3182779 0.1471616 -2.163 0.03092 *
## Leukocytes -1.0752164 0.1384906 -7.764 3.14e-14 ***
## age3.pm10 -0.0001602 0.0032039 -0.050 0.96013
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1849 on 662 degrees of freedom
## (119 observations deleted due to missingness)
## Multiple R-squared: 0.3542, Adjusted R-squared: 0.3434
## F-statistic: 33 on 11 and 662 DF, p-value: < 2.2e-16
output$IQRcoef.cs[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.cs[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.cs[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.cs[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Output
output
## Exposure Age N IQRcoef.r IQRlcl.r IQRucl.r pval.r
## 1 PM2.5 All 1405 -0.034267487 -0.07721979 0.0086848164 0.117804073
## 2 PM2.5 9 684 -0.016522589 -0.07934382 0.0462986371 0.605731296
## 3 PM2.5 15 721 -0.026799538 -0.08834585 0.0347467777 0.392895258
## 4 PM10 All 1309 -0.017967483 -0.03654604 0.0006110712 0.058014393
## 5 PM10 9 635 -0.003569828 -0.03027647 0.0231368113 0.793026788
## 6 PM10 15 674 -0.034338258 -0.06043038 -0.0082461401 0.009975976
## IQRcoef.c IQRlcl.c IQRucl.c pval.c IQRcoef.cs IQRlcl.cs
## 1 -0.034267487 -0.07721979 0.0086848164 0.117804073 -0.021692625 -0.05684954
## 2 -0.016522589 -0.07934382 0.0462986371 0.605731296 -0.007673835 -0.05916471
## 3 -0.026799538 -0.08834585 0.0347467777 0.392895258 -0.014826456 -0.06510226
## 4 -0.017967483 -0.03654604 0.0006110712 0.058014393 -0.015906123 -0.03176878
## 5 -0.003569828 -0.03027647 0.0231368113 0.793026788 -0.008318897 -0.03136131
## 6 -0.034338258 -0.06043038 -0.0082461401 0.009975976 -0.024907312 -0.04695037
## IQRucl.cs pval.cs
## 1 1.346429e-02 0.22633284
## 2 4.381704e-02 0.76989826
## 3 3.544935e-02 0.56278216
## 4 -4.347107e-05 0.04937638
## 5 1.472352e-02 0.47860573
## 6 -2.864251e-03 0.02684583
write.csv(output, file=here("Output",paste0("FFCW_AirPoll_Std_PEG_Regression_Sens_Age3_", date, ".csv")) )
output<-data.frame(matrix(nrow=6, ncol= 15))
colnames(output) <- c("Exposure", "Age", "N", "IQRcoef.r", "IQRlcl.r", "IQRucl.r", "pval.r", "IQRcoef.c", "IQRlcl.c", "IQRucl.c", "pval.c", "IQRcoef.cs", "IQRlcl.cs", "IQRucl.cs", "pval.cs")
output$Exposure <- c(rep("PM2.5", 3), rep("PM10", 3))
output$Age <- c("All", "9", "15")
IQR(include$birth.pm25, na.rm=T)
## [1] 10.74194
IQR(include$birth.pm10, na.rm=T)
## [1] 3.223546
### Raw
mod<-lm(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm10, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## birth.pm10, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.43798 -0.28813 -0.03526 0.23924 1.62276
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.958295 0.265844 22.413 < 2e-16 ***
## birth.pm25 -0.002145 0.001866 -1.149 0.25073
## age.dnam -0.007930 0.003774 -2.101 0.03582 *
## sexm 0.048072 0.023021 2.088 0.03696 *
## matrace.factorNon-Hispanic Black 0.435082 0.033717 12.904 < 2e-16 ***
## matrace.factorHispanic 0.053910 0.040918 1.318 0.18788
## matrace.factorOther 0.141052 0.067852 2.079 0.03781 *
## cm1inpov 0.010402 0.005443 1.911 0.05622 .
## m1b2 0.056124 0.031761 1.767 0.07743 .
## Epithelial.cells -3.187917 0.240373 -13.262 < 2e-16 ***
## Leukocytes -6.252160 0.224308 -27.873 < 2e-16 ***
## birth.pm10 0.011265 0.004277 2.634 0.00854 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4308 on 1413 degrees of freedom
## (117 observations deleted due to missingness)
## Multiple R-squared: 0.67, Adjusted R-squared: 0.6674
## F-statistic: 260.8 on 11 and 1413 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm10, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## birth.pm10, data = include[include$childteen == "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.9945 -0.2940 -0.0334 0.2495 1.3625
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.368196 0.619423 8.666 <2e-16 ***
## birth.pm25 -0.002093 0.002638 -0.793 0.4280
## age.dnam 0.066072 0.054103 1.221 0.2224
## sexm 0.052085 0.032564 1.599 0.1102
## matrace.factorNon-Hispanic Black 0.447850 0.047738 9.381 <2e-16 ***
## matrace.factorHispanic 0.014962 0.057812 0.259 0.7959
## matrace.factorOther 0.137486 0.097379 1.412 0.1584
## cm1inpov 0.014049 0.007722 1.819 0.0693 .
## m1b2 0.049926 0.044989 1.110 0.2675
## Epithelial.cells -3.120963 0.349966 -8.918 <2e-16 ***
## Leukocytes -6.297439 0.322337 -19.537 <2e-16 ***
## birth.pm10 0.007774 0.005980 1.300 0.1940
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4243 on 678 degrees of freedom
## (59 observations deleted due to missingness)
## Multiple R-squared: 0.6561, Adjusted R-squared: 0.6505
## F-statistic: 117.6 on 11 and 678 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm10, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## birth.pm10, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.42607 -0.28494 -0.03792 0.22830 1.61025
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.765525 0.714423 8.070 2.92e-15 ***
## birth.pm25 -0.002097 0.002707 -0.775 0.4387
## age.dnam -0.001872 0.041691 -0.045 0.9642
## sexm 0.044220 0.032777 1.349 0.1777
## matrace.factorNon-Hispanic Black 0.427654 0.047964 8.916 < 2e-16 ***
## matrace.factorHispanic 0.090606 0.058349 1.553 0.1209
## matrace.factorOther 0.149050 0.095186 1.566 0.1178
## cm1inpov 0.007994 0.007750 1.032 0.3026
## m1b2 0.063542 0.045029 1.411 0.1586
## Epithelial.cells -3.221414 0.335231 -9.610 < 2e-16 ***
## Leukocytes -6.218660 0.315287 -19.724 < 2e-16 ***
## birth.pm10 0.015201 0.006185 2.458 0.0142 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4386 on 723 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.6825, Adjusted R-squared: 0.6777
## F-statistic: 141.3 on 11 and 723 DF, p-value: < 2.2e-16
output$N[1:3] <- c(nrow(model.frame(mod)), nrow(model.frame(mod.a9)), nrow(model.frame(mod.a15)))
output$IQRcoef.r[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.r[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.r[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.r[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm25, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## birth.pm25, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65759 -0.14242 -0.01167 0.12246 1.16835
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.5234786 0.1343159 26.233 < 2e-16 ***
## birth.pm10 -0.0041626 0.0021610 -1.926 0.05427 .
## age.dnam 0.0052850 0.0019069 2.771 0.00565 **
## sexm 0.0298702 0.0116310 2.568 0.01033 *
## matrace.factorNon-Hispanic Black 0.0035391 0.0170353 0.208 0.83545
## matrace.factorHispanic -0.0276025 0.0206734 -1.335 0.18204
## matrace.factorOther -0.0683293 0.0342815 -1.993 0.04643 *
## cm1inpov -0.0023039 0.0027503 -0.838 0.40233
## m1b2 -0.0119113 0.0160470 -0.742 0.45804
## Epithelial.cells -0.6361516 0.1214467 -5.238 1.87e-07 ***
## Leukocytes -3.5580208 0.1133303 -31.395 < 2e-16 ***
## birth.pm25 -0.0001054 0.0009430 -0.112 0.91100
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2177 on 1413 degrees of freedom
## (117 observations deleted due to missingness)
## Multiple R-squared: 0.8204, Adjusted R-squared: 0.819
## F-statistic: 586.7 on 11 and 1413 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm25, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## birth.pm25, data = include[include$childteen == "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.63355 -0.15101 -0.01642 0.12312 1.17879
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.1993328 0.3207631 9.974 < 2e-16 ***
## birth.pm10 -0.0013328 0.0030968 -0.430 0.667053
## age.dnam 0.0309142 0.0280171 1.103 0.270242
## sexm 0.0207108 0.0168631 1.228 0.219810
## matrace.factorNon-Hispanic Black 0.0222729 0.0247208 0.901 0.367922
## matrace.factorHispanic -0.0062221 0.0299374 -0.208 0.835419
## matrace.factorOther -0.0524898 0.0504267 -1.041 0.298288
## cm1inpov -0.0013138 0.0039986 -0.329 0.742577
## m1b2 -0.0290504 0.0232972 -1.247 0.212847
## Epithelial.cells -0.6103030 0.1812272 -3.368 0.000801 ***
## Leukocytes -3.5112384 0.1669194 -21.036 < 2e-16 ***
## birth.pm25 0.0003696 0.0013662 0.271 0.786840
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2197 on 678 degrees of freedom
## (59 observations deleted due to missingness)
## Multiple R-squared: 0.782, Adjusted R-squared: 0.7785
## F-statistic: 221.1 on 11 and 678 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm25, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## birth.pm25, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.60210 -0.13868 -0.00839 0.12768 1.18987
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.1906659 0.3522411 9.058 < 2e-16 ***
## birth.pm10 -0.0071641 0.0030496 -2.349 0.0191 *
## age.dnam 0.0345156 0.0205553 1.679 0.0936 .
## sexm 0.0368913 0.0161603 2.283 0.0227 *
## matrace.factorNon-Hispanic Black -0.0148861 0.0236483 -0.629 0.5292
## matrace.factorHispanic -0.0504615 0.0287684 -1.754 0.0798 .
## matrace.factorOther -0.0790522 0.0469308 -1.684 0.0925 .
## cm1inpov -0.0026756 0.0038210 -0.700 0.4840
## m1b2 0.0044819 0.0222010 0.202 0.8401
## Epithelial.cells -0.6877474 0.1652835 -4.161 3.55e-05 ***
## Leukocytes -3.6235009 0.1554501 -23.310 < 2e-16 ***
## birth.pm25 -0.0007376 0.0013347 -0.553 0.5807
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2162 on 723 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.8438, Adjusted R-squared: 0.8415
## F-statistic: 355.1 on 11 and 723 DF, p-value: < 2.2e-16
output$N[4:6] <- c(nrow(model.frame(mod)), nrow(model.frame(mod.a9)), nrow(model.frame(mod.a15)))
output$IQRcoef.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.r[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Centered
mod<-lm(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm10, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm25.centstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## birth.pm10, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.43798 -0.28813 -0.03526 0.23924 1.62276
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.958295 0.265844 22.413 < 2e-16 ***
## birth.pm25 -0.002145 0.001866 -1.149 0.25073
## age.dnam -0.007930 0.003774 -2.101 0.03582 *
## sexm 0.048072 0.023021 2.088 0.03696 *
## matrace.factorNon-Hispanic Black 0.435082 0.033717 12.904 < 2e-16 ***
## matrace.factorHispanic 0.053910 0.040918 1.318 0.18788
## matrace.factorOther 0.141052 0.067852 2.079 0.03781 *
## cm1inpov 0.010402 0.005443 1.911 0.05622 .
## m1b2 0.056124 0.031761 1.767 0.07743 .
## Epithelial.cells -3.187917 0.240373 -13.262 < 2e-16 ***
## Leukocytes -6.252160 0.224308 -27.873 < 2e-16 ***
## birth.pm10 0.011265 0.004277 2.634 0.00854 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4308 on 1413 degrees of freedom
## (117 observations deleted due to missingness)
## Multiple R-squared: 0.67, Adjusted R-squared: 0.6674
## F-statistic: 260.8 on 11 and 1413 DF, p-value: < 2.2e-16
summary(mod)$coef[2,4]
## [1] 0.2507349
mod.a9<-lm(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm10, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm25.centstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## birth.pm10, data = include[include$childteen == "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.9945 -0.2940 -0.0334 0.2495 1.3625
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.368196 0.619423 8.666 <2e-16 ***
## birth.pm25 -0.002093 0.002638 -0.793 0.4280
## age.dnam 0.066072 0.054103 1.221 0.2224
## sexm 0.052085 0.032564 1.599 0.1102
## matrace.factorNon-Hispanic Black 0.447850 0.047738 9.381 <2e-16 ***
## matrace.factorHispanic 0.014962 0.057812 0.259 0.7959
## matrace.factorOther 0.137486 0.097379 1.412 0.1584
## cm1inpov 0.014049 0.007722 1.819 0.0693 .
## m1b2 0.049926 0.044989 1.110 0.2675
## Epithelial.cells -3.120963 0.349966 -8.918 <2e-16 ***
## Leukocytes -6.297439 0.322337 -19.537 <2e-16 ***
## birth.pm10 0.007774 0.005980 1.300 0.1940
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4243 on 678 degrees of freedom
## (59 observations deleted due to missingness)
## Multiple R-squared: 0.6561, Adjusted R-squared: 0.6505
## F-statistic: 117.6 on 11 and 678 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm10, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm25.centstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## birth.pm10, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.42607 -0.28494 -0.03792 0.22830 1.61025
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.765525 0.714423 8.070 2.92e-15 ***
## birth.pm25 -0.002097 0.002707 -0.775 0.4387
## age.dnam -0.001872 0.041691 -0.045 0.9642
## sexm 0.044220 0.032777 1.349 0.1777
## matrace.factorNon-Hispanic Black 0.427654 0.047964 8.916 < 2e-16 ***
## matrace.factorHispanic 0.090606 0.058349 1.553 0.1209
## matrace.factorOther 0.149050 0.095186 1.566 0.1178
## cm1inpov 0.007994 0.007750 1.032 0.3026
## m1b2 0.063542 0.045029 1.411 0.1586
## Epithelial.cells -3.221414 0.335231 -9.610 < 2e-16 ***
## Leukocytes -6.218660 0.315287 -19.724 < 2e-16 ***
## birth.pm10 0.015201 0.006185 2.458 0.0142 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4386 on 723 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.6825, Adjusted R-squared: 0.6777
## F-statistic: 141.3 on 11 and 723 DF, p-value: < 2.2e-16
output$IQRcoef.c[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.c[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.c[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.c[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm25, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm10.centstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## birth.pm25, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65759 -0.14242 -0.01167 0.12246 1.16835
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.5234786 0.1343159 26.233 < 2e-16 ***
## birth.pm10 -0.0041626 0.0021610 -1.926 0.05427 .
## age.dnam 0.0052850 0.0019069 2.771 0.00565 **
## sexm 0.0298702 0.0116310 2.568 0.01033 *
## matrace.factorNon-Hispanic Black 0.0035391 0.0170353 0.208 0.83545
## matrace.factorHispanic -0.0276025 0.0206734 -1.335 0.18204
## matrace.factorOther -0.0683293 0.0342815 -1.993 0.04643 *
## cm1inpov -0.0023039 0.0027503 -0.838 0.40233
## m1b2 -0.0119113 0.0160470 -0.742 0.45804
## Epithelial.cells -0.6361516 0.1214467 -5.238 1.87e-07 ***
## Leukocytes -3.5580208 0.1133303 -31.395 < 2e-16 ***
## birth.pm25 -0.0001054 0.0009430 -0.112 0.91100
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2177 on 1413 degrees of freedom
## (117 observations deleted due to missingness)
## Multiple R-squared: 0.8204, Adjusted R-squared: 0.819
## F-statistic: 586.7 on 11 and 1413 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm25, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm10.centstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## birth.pm25, data = include[include$childteen == "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.63355 -0.15101 -0.01642 0.12312 1.17879
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.1993328 0.3207631 9.974 < 2e-16 ***
## birth.pm10 -0.0013328 0.0030968 -0.430 0.667053
## age.dnam 0.0309142 0.0280171 1.103 0.270242
## sexm 0.0207108 0.0168631 1.228 0.219810
## matrace.factorNon-Hispanic Black 0.0222729 0.0247208 0.901 0.367922
## matrace.factorHispanic -0.0062221 0.0299374 -0.208 0.835419
## matrace.factorOther -0.0524898 0.0504267 -1.041 0.298288
## cm1inpov -0.0013138 0.0039986 -0.329 0.742577
## m1b2 -0.0290504 0.0232972 -1.247 0.212847
## Epithelial.cells -0.6103030 0.1812272 -3.368 0.000801 ***
## Leukocytes -3.5112384 0.1669194 -21.036 < 2e-16 ***
## birth.pm25 0.0003696 0.0013662 0.271 0.786840
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2197 on 678 degrees of freedom
## (59 observations deleted due to missingness)
## Multiple R-squared: 0.782, Adjusted R-squared: 0.7785
## F-statistic: 221.1 on 11 and 678 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm25, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm10.centstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes +
## birth.pm25, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.60210 -0.13868 -0.00839 0.12768 1.18987
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.1906659 0.3522411 9.058 < 2e-16 ***
## birth.pm10 -0.0071641 0.0030496 -2.349 0.0191 *
## age.dnam 0.0345156 0.0205553 1.679 0.0936 .
## sexm 0.0368913 0.0161603 2.283 0.0227 *
## matrace.factorNon-Hispanic Black -0.0148861 0.0236483 -0.629 0.5292
## matrace.factorHispanic -0.0504615 0.0287684 -1.754 0.0798 .
## matrace.factorOther -0.0790522 0.0469308 -1.684 0.0925 .
## cm1inpov -0.0026756 0.0038210 -0.700 0.4840
## m1b2 0.0044819 0.0222010 0.202 0.8401
## Epithelial.cells -0.6877474 0.1652835 -4.161 3.55e-05 ***
## Leukocytes -3.6235009 0.1554501 -23.310 < 2e-16 ***
## birth.pm25 -0.0007376 0.0013347 -0.553 0.5807
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2162 on 723 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.8438, Adjusted R-squared: 0.8415
## F-statistic: 355.1 on 11 and 723 DF, p-value: < 2.2e-16
output$IQRcoef.c[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.c[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.c[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.c[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Centered & Scaled
mod<-lm(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm10, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm25.centscalestd ~ birth.pm25 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + birth.pm10, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.0625 -0.2392 -0.0300 0.1978 1.3797
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.7567571 0.2175050 21.870 < 2e-16 ***
## birth.pm25 -0.0009455 0.0015270 -0.619 0.53588
## age.dnam -0.0095519 0.0030880 -3.093 0.00202 **
## sexm 0.0359228 0.0188347 1.907 0.05669 .
## matrace.factorNon-Hispanic Black 0.2630261 0.0275862 9.535 < 2e-16 ***
## matrace.factorHispanic 0.0307112 0.0334776 0.917 0.35911
## matrace.factorOther 0.0841322 0.0555139 1.516 0.12987
## cm1inpov 0.0095004 0.0044536 2.133 0.03308 *
## m1b2 0.0367066 0.0259857 1.413 0.15800
## Epithelial.cells -3.0917130 0.1966652 -15.721 < 2e-16 ***
## Leukocytes -4.8341138 0.1835219 -26.341 < 2e-16 ***
## birth.pm10 0.0045978 0.0034994 1.314 0.18910
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3525 on 1413 degrees of freedom
## (117 observations deleted due to missingness)
## Multiple R-squared: 0.5517, Adjusted R-squared: 0.5482
## F-statistic: 158.1 on 11 and 1413 DF, p-value: < 2.2e-16
summary(mod)$coef[2,4]
## [1] 0.5358814
mod.a9<-lm(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm10, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm25.centscalestd ~ birth.pm25 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + birth.pm10, data = include[include$childteen ==
## "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.89210 -0.22971 -0.02894 0.19033 1.39111
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.1456814 0.5034794 8.234 9.30e-16 ***
## birth.pm25 -0.0010308 0.0021445 -0.481 0.6309
## age.dnam 0.0544160 0.0439764 1.237 0.2164
## sexm 0.0494740 0.0264689 1.869 0.0620 .
## matrace.factorNon-Hispanic Black 0.2824953 0.0388026 7.280 9.26e-13 ***
## matrace.factorHispanic 0.0070163 0.0469907 0.149 0.8814
## matrace.factorOther 0.0762463 0.0791513 0.963 0.3357
## cm1inpov 0.0129242 0.0062763 2.059 0.0399 *
## m1b2 0.0246960 0.0365679 0.675 0.4997
## Epithelial.cells -2.9190522 0.2844597 -10.262 < 2e-16 ***
## Leukocytes -4.7593006 0.2620018 -18.165 < 2e-16 ***
## birth.pm10 0.0004079 0.0048608 0.084 0.9332
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3449 on 678 degrees of freedom
## (59 observations deleted due to missingness)
## Multiple R-squared: 0.5452, Adjusted R-squared: 0.5378
## F-statistic: 73.88 on 11 and 678 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm10, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm25.centscalestd ~ birth.pm25 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + birth.pm10, data = include[include$childteen ==
## "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.07450 -0.24539 -0.03085 0.18914 1.30270
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.8248954 0.5870923 8.218 9.53e-16 ***
## birth.pm25 -0.0006265 0.0022245 -0.282 0.7783
## age.dnam -0.0147225 0.0342602 -0.430 0.6675
## sexm 0.0242233 0.0269350 0.899 0.3688
## matrace.factorNon-Hispanic Black 0.2488972 0.0394155 6.315 4.72e-10 ***
## matrace.factorHispanic 0.0518760 0.0479493 1.082 0.2797
## matrace.factorOther 0.0932230 0.0782211 1.192 0.2337
## cm1inpov 0.0069040 0.0063686 1.084 0.2787
## m1b2 0.0492723 0.0370032 1.332 0.1834
## Epithelial.cells -3.2127000 0.2754836 -11.662 < 2e-16 ***
## Leukocytes -4.8998134 0.2590941 -18.911 < 2e-16 ***
## birth.pm10 0.0091810 0.0050829 1.806 0.0713 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3604 on 723 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.5614, Adjusted R-squared: 0.5547
## F-statistic: 84.13 on 11 and 723 DF, p-value: < 2.2e-16
output$IQRcoef.cs[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.cs[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.cs[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.cs[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm25, na.option=na.exclude, data=include)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = peg.pm10.centscalestd ~ birth.pm10 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + birth.pm25, data = include, na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.51243 -0.11847 -0.02060 0.09357 1.57867
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.8191323 0.1143852 7.161 1.28e-12 ***
## birth.pm10 -0.0043167 0.0018403 -2.346 0.0191 *
## age.dnam 0.0074434 0.0016240 4.583 4.98e-06 ***
## sexm 0.0158258 0.0099051 1.598 0.1103
## matrace.factorNon-Hispanic Black -0.0112393 0.0145075 -0.775 0.4386
## matrace.factorHispanic -0.0344227 0.0176058 -1.955 0.0508 .
## matrace.factorOther -0.0657730 0.0291946 -2.253 0.0244 *
## cm1inpov -0.0022707 0.0023422 -0.969 0.3325
## m1b2 -0.0117182 0.0136658 -0.857 0.3913
## Epithelial.cells -0.1531562 0.1034257 -1.481 0.1389
## Leukocytes -0.9116961 0.0965136 -9.446 < 2e-16 ***
## birth.pm25 0.0006197 0.0008030 0.772 0.4404
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1854 on 1413 degrees of freedom
## (117 observations deleted due to missingness)
## Multiple R-squared: 0.3142, Adjusted R-squared: 0.3089
## F-statistic: 58.86 on 11 and 1413 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm25, na.option=na.exclude, data=include[include$childteen=="C",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = peg.pm10.centscalestd ~ birth.pm10 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + birth.pm25, data = include[include$childteen ==
## "C", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49042 -0.11797 -0.02029 0.09195 1.45529
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.629471 0.274491 2.293 0.0221 *
## birth.pm10 -0.001937 0.002650 -0.731 0.4650
## age.dnam 0.002086 0.023975 0.087 0.9307
## sexm 0.014849 0.014431 1.029 0.3038
## matrace.factorNon-Hispanic Black 0.012360 0.021155 0.584 0.5592
## matrace.factorHispanic -0.002265 0.025619 -0.088 0.9296
## matrace.factorOther -0.047822 0.043152 -1.108 0.2682
## cm1inpov -0.001584 0.003422 -0.463 0.6436
## m1b2 -0.031446 0.019936 -1.577 0.1152
## Epithelial.cells 0.045747 0.155084 0.295 0.7681
## Leukocytes -0.719483 0.142840 -5.037 6.07e-07 ***
## birth.pm25 0.001032 0.001169 0.883 0.3777
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.188 on 678 degrees of freedom
## (59 observations deleted due to missingness)
## Multiple R-squared: 0.2452, Adjusted R-squared: 0.233
## F-statistic: 20.03 on 11 and 678 DF, p-value: < 2.2e-16
mod.a15<-lm(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm25, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = peg.pm10.centscalestd ~ birth.pm10 + age.dnam +
## sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells +
## Leukocytes + birth.pm25, data = include[include$childteen ==
## "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.45727 -0.11796 -0.01399 0.09594 1.60581
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.575e-01 2.977e-01 2.545 0.01115 *
## birth.pm10 -7.152e-03 2.577e-03 -2.775 0.00566 **
## age.dnam 2.704e-02 1.737e-02 1.556 0.12004
## sexm 1.639e-02 1.366e-02 1.200 0.23060
## matrace.factorNon-Hispanic Black -3.344e-02 1.999e-02 -1.673 0.09477 .
## matrace.factorHispanic -6.604e-02 2.431e-02 -2.716 0.00677 **
## matrace.factorOther -8.034e-02 3.966e-02 -2.026 0.04318 *
## cm1inpov -2.923e-03 3.229e-03 -0.905 0.36567
## m1b2 6.081e-03 1.876e-02 0.324 0.74597
## Epithelial.cells -3.342e-01 1.397e-01 -2.392 0.01699 *
## Leukocytes -1.091e+00 1.314e-01 -8.305 4.92e-16 ***
## birth.pm25 5.138e-05 1.128e-03 0.046 0.96368
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1828 on 723 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.352, Adjusted R-squared: 0.3421
## F-statistic: 35.7 on 11 and 723 DF, p-value: < 2.2e-16
output$IQRcoef.cs[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.cs[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.cs[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.cs[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Output
output
## Exposure Age N IQRcoef.r IQRlcl.r IQRucl.r pval.r
## 1 PM2.5 All 1425 -0.023036213 -0.06236378 0.0162913541 0.25073491
## 2 PM2.5 9 690 -0.022477644 -0.07812375 0.0331684602 0.42798410
## 3 PM2.5 15 735 -0.022530341 -0.07961788 0.0345571967 0.43869793
## 4 PM10 All 1425 -0.013418397 -0.02708334 0.0002465455 0.05427332
## 5 PM10 9 690 -0.004296392 -0.02389711 0.0153043212 0.66705312
## 6 PM10 15 735 -0.023093845 -0.04239376 -0.0037939334 0.01908291
## IQRcoef.c IQRlcl.c IQRucl.c pval.c IQRcoef.cs IQRlcl.cs
## 1 -0.023036213 -0.06236378 0.0162913541 0.25073491 -0.010156714 -0.04233325
## 2 -0.022477644 -0.07812375 0.0331684602 0.42798410 -0.011072399 -0.05630269
## 3 -0.022530341 -0.07961788 0.0345571967 0.43869793 -0.006730311 -0.05364322
## 4 -0.013418397 -0.02708334 0.0002465455 0.05427332 -0.013915043 -0.02555229
## 5 -0.004296392 -0.02389711 0.0153043212 0.66705312 -0.006244600 -0.02301779
## 6 -0.023093845 -0.04239376 -0.0037939334 0.01908291 -0.023054842 -0.03936636
## IQRucl.cs pval.cs
## 1 0.022019826 0.535881445
## 2 0.034157895 0.630914494
## 3 0.040182596 0.778288136
## 4 -0.002277794 0.019133996
## 5 0.010528587 0.465036079
## 6 -0.006743328 0.005664865
write.csv(output, file=here("Output",paste0("FFCW_AirPoll_Std_PEG_Regression_Sens_Co_Expo_", date, ".csv")) )
output<-data.frame(matrix(nrow=6, ncol= 15))
colnames(output) <- c("Exposure", "Age", "N", "IQRcoef.r", "IQRlcl.r", "IQRucl.r", "pval.r", "IQRcoef.c", "IQRlcl.c", "IQRucl.c", "pval.c", "IQRcoef.cs", "IQRlcl.cs", "IQRucl.cs", "pval.cs")
output$Exposure <- c(rep("PM2.5", 3), rep("PM10", 3))
output$Age <- c("All", "9", "15")
IQR(include$birth.pm25, na.rm=T)
## [1] 10.74194
IQR(include$birth.pm10, na.rm=T)
## [1] 3.223546
### Raw
mod<-lm(peg.no2.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include)
summary(mod)
##
## Call:
## lm(formula = peg.no2.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor +
## cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data = include)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.1830 -0.5545 0.0228 0.5254 2.8673
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.664226 0.487213 -1.363 0.172983
## birth.pm25 0.003456 0.003106 1.113 0.265936
## age.dnam 0.006700 0.007100 0.944 0.345449
## sexm 0.148872 0.043526 3.420 0.000642 ***
## matrace.factorNon-Hispanic Black 0.172552 0.064501 2.675 0.007549 **
## matrace.factorHispanic -0.397649 0.074028 -5.372 9.01e-08 ***
## matrace.factorOther -0.042242 0.127519 -0.331 0.740494
## cm1inpov -0.013977 0.010361 -1.349 0.177529
## m1b2 0.012286 0.059102 0.208 0.835355
## Epithelial.cells 1.152403 0.452565 2.546 0.010982 *
## Leukocytes 0.307356 0.422564 0.727 0.467118
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.849 on 1531 degrees of freedom
## Multiple R-squared: 0.09899, Adjusted R-squared: 0.0931
## F-statistic: 16.82 on 10 and 1531 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.no2.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="C",])
summary(mod.a9)
##
## Call:
## lm(formula = peg.no2.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor +
## cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data = include[include$childteen ==
## "C", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2176 -0.5287 0.0272 0.5115 2.4723
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.892692 1.094477 -0.816 0.414973
## birth.pm25 0.004820 0.004508 1.069 0.285278
## age.dnam 0.011502 0.094046 0.122 0.902692
## sexm 0.066613 0.060709 1.097 0.272894
## matrace.factorNon-Hispanic Black 0.220977 0.090075 2.453 0.014387 *
## matrace.factorHispanic -0.348151 0.103986 -3.348 0.000855 ***
## matrace.factorOther 0.015306 0.178633 0.086 0.931741
## cm1inpov -0.011259 0.014503 -0.776 0.437825
## m1b2 0.047757 0.082623 0.578 0.563430
## Epithelial.cells 1.494490 0.654160 2.285 0.022620 *
## Leukocytes 0.370512 0.603846 0.614 0.539677
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8251 on 738 degrees of freedom
## Multiple R-squared: 0.1075, Adjusted R-squared: 0.09543
## F-statistic: 8.892 on 10 and 738 DF, p-value: 6.839e-14
mod.a15<-lm(peg.no2.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="T",])
summary(mod.a15)
##
## Call:
## lm(formula = peg.no2.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor +
## cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data = include[include$childteen ==
## "T", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.94207 -0.59447 0.03531 0.57857 2.96218
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.748154 1.210061 -1.445 0.148948
## birth.pm25 0.002848 0.004494 0.634 0.526510
## age.dnam 0.090877 0.065027 1.398 0.162650
## sexm 0.221763 0.062555 3.545 0.000416 ***
## matrace.factorNon-Hispanic Black 0.123440 0.093017 1.327 0.184873
## matrace.factorHispanic -0.450128 0.106997 -4.207 2.89e-05 ***
## matrace.factorOther -0.080511 0.182187 -0.442 0.658672
## cm1inpov -0.014422 0.014947 -0.965 0.334906
## m1b2 -0.014874 0.084878 -0.175 0.860940
## Epithelial.cells 0.869083 0.634907 1.369 0.171444
## Leukocytes 0.184966 0.597113 0.310 0.756821
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8723 on 782 degrees of freedom
## Multiple R-squared: 0.09896, Adjusted R-squared: 0.08744
## F-statistic: 8.589 on 10 and 782 DF, p-value: 2.123e-13
output$IQRcoef.r[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$N[1:3] <- c(nrow(model.frame(mod)), nrow(model.frame(mod.a9)), nrow(model.frame(mod.a15)))
output$IQRlcl.r[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.r[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.r[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(peg.no2.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include)
summary(mod)
##
## Call:
## lm(formula = peg.no2.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor +
## cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data = include)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.05854 -0.54561 0.01599 0.52896 2.90550
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.306254 0.510290 -2.560 0.010576 *
## birth.pm10 0.042167 0.008098 5.207 2.2e-07 ***
## age.dnam 0.007762 0.007318 1.061 0.289036
## sexm 0.152299 0.044638 3.412 0.000663 ***
## matrace.factorNon-Hispanic Black 0.139726 0.064978 2.150 0.031697 *
## matrace.factorHispanic -0.287773 0.077981 -3.690 0.000232 ***
## matrace.factorOther -0.029005 0.131584 -0.220 0.825570
## cm1inpov -0.010747 0.010554 -1.018 0.308754
## m1b2 0.017284 0.061581 0.281 0.779000
## Epithelial.cells 1.248591 0.466175 2.678 0.007484 **
## Leukocytes 0.379386 0.435015 0.872 0.383290
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8355 on 1414 degrees of freedom
## (117 observations deleted due to missingness)
## Multiple R-squared: 0.1161, Adjusted R-squared: 0.1098
## F-statistic: 18.56 on 10 and 1414 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.no2.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="C",])
summary(mod.a9)
##
## Call:
## lm(formula = peg.no2.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor +
## cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data = include[include$childteen ==
## "C", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.10860 -0.53508 0.01444 0.47567 2.46999
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.864030 1.165512 -1.599 0.110214
## birth.pm10 0.043011 0.011188 3.844 0.000132 ***
## age.dnam 0.077236 0.102916 0.750 0.453226
## sexm 0.066435 0.062204 1.068 0.285897
## matrace.factorNon-Hispanic Black 0.206750 0.090609 2.282 0.022811 *
## matrace.factorHispanic -0.229851 0.108614 -2.116 0.034690 *
## matrace.factorOther 0.025174 0.186042 0.135 0.892404
## cm1inpov -0.005561 0.014752 -0.377 0.706300
## m1b2 0.060921 0.085949 0.709 0.478690
## Epithelial.cells 1.260604 0.668683 1.885 0.059829 .
## Leukocytes 0.189314 0.615771 0.307 0.758602
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8108 on 679 degrees of freedom
## (59 observations deleted due to missingness)
## Multiple R-squared: 0.1254, Adjusted R-squared: 0.1125
## F-statistic: 9.735 on 10 and 679 DF, p-value: 2.696e-15
mod.a15<-lm(peg.no2.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="T",])
summary(mod.a15)
##
## Call:
## lm(formula = peg.no2.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor +
## cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data = include[include$childteen ==
## "T", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.08166 -0.56316 0.01064 0.57230 3.00735
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.13399 1.39380 -2.249 0.024843 *
## birth.pm10 0.03942 0.01186 3.323 0.000935 ***
## age.dnam 0.13078 0.08030 1.629 0.103849
## sexm 0.22609 0.06419 3.522 0.000455 ***
## matrace.factorNon-Hispanic Black 0.07770 0.09346 0.831 0.406012
## matrace.factorHispanic -0.34444 0.11216 -3.071 0.002214 **
## matrace.factorOther -0.06147 0.18638 -0.330 0.741628
## cm1inpov -0.01273 0.01517 -0.839 0.401610
## m1b2 -0.02351 0.08815 -0.267 0.789808
## Epithelial.cells 1.20426 0.65641 1.835 0.066972 .
## Leukocytes 0.45539 0.61739 0.738 0.460994
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8589 on 724 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.117, Adjusted R-squared: 0.1048
## F-statistic: 9.591 on 10 and 724 DF, p-value: 4.143e-15
output$N[4:6] <- c(nrow(model.frame(mod)), nrow(model.frame(mod.a9)), nrow(model.frame(mod.a15)))
output$IQRcoef.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.r[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Centered
mod<-lm(peg.no2.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include)
summary(mod)
##
## Call:
## lm(formula = peg.no2.centstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.1830 -0.5545 0.0228 0.5254 2.8673
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.664226 0.487213 -1.363 0.172983
## birth.pm25 0.003456 0.003106 1.113 0.265936
## age.dnam 0.006700 0.007100 0.944 0.345449
## sexm 0.148872 0.043526 3.420 0.000642 ***
## matrace.factorNon-Hispanic Black 0.172552 0.064501 2.675 0.007549 **
## matrace.factorHispanic -0.397649 0.074028 -5.372 9.01e-08 ***
## matrace.factorOther -0.042242 0.127519 -0.331 0.740494
## cm1inpov -0.013977 0.010361 -1.349 0.177529
## m1b2 0.012286 0.059102 0.208 0.835355
## Epithelial.cells 1.152403 0.452565 2.546 0.010982 *
## Leukocytes 0.307356 0.422564 0.727 0.467118
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.849 on 1531 degrees of freedom
## Multiple R-squared: 0.09899, Adjusted R-squared: 0.0931
## F-statistic: 16.82 on 10 and 1531 DF, p-value: < 2.2e-16
summary(mod)$coef[2,4]
## [1] 0.2659356
mod.a9<-lm(peg.no2.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="C",])
summary(mod.a9)
##
## Call:
## lm(formula = peg.no2.centstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "C", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2176 -0.5287 0.0272 0.5115 2.4723
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.892692 1.094477 -0.816 0.414973
## birth.pm25 0.004820 0.004508 1.069 0.285278
## age.dnam 0.011502 0.094046 0.122 0.902692
## sexm 0.066613 0.060709 1.097 0.272894
## matrace.factorNon-Hispanic Black 0.220977 0.090075 2.453 0.014387 *
## matrace.factorHispanic -0.348151 0.103986 -3.348 0.000855 ***
## matrace.factorOther 0.015306 0.178633 0.086 0.931741
## cm1inpov -0.011259 0.014503 -0.776 0.437825
## m1b2 0.047757 0.082623 0.578 0.563430
## Epithelial.cells 1.494490 0.654160 2.285 0.022620 *
## Leukocytes 0.370512 0.603846 0.614 0.539677
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8251 on 738 degrees of freedom
## Multiple R-squared: 0.1075, Adjusted R-squared: 0.09543
## F-statistic: 8.892 on 10 and 738 DF, p-value: 6.839e-14
mod.a15<-lm(peg.no2.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="T",])
summary(mod.a15)
##
## Call:
## lm(formula = peg.no2.centstd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "T", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.94207 -0.59447 0.03531 0.57857 2.96218
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.748154 1.210061 -1.445 0.148948
## birth.pm25 0.002848 0.004494 0.634 0.526510
## age.dnam 0.090877 0.065027 1.398 0.162650
## sexm 0.221763 0.062555 3.545 0.000416 ***
## matrace.factorNon-Hispanic Black 0.123440 0.093017 1.327 0.184873
## matrace.factorHispanic -0.450128 0.106997 -4.207 2.89e-05 ***
## matrace.factorOther -0.080511 0.182187 -0.442 0.658672
## cm1inpov -0.014422 0.014947 -0.965 0.334906
## m1b2 -0.014874 0.084878 -0.175 0.860940
## Epithelial.cells 0.869083 0.634907 1.369 0.171444
## Leukocytes 0.184966 0.597113 0.310 0.756821
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8723 on 782 degrees of freedom
## Multiple R-squared: 0.09896, Adjusted R-squared: 0.08744
## F-statistic: 8.589 on 10 and 782 DF, p-value: 2.123e-13
output$IQRcoef.c[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.c[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.c[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.c[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(peg.no2.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include)
summary(mod)
##
## Call:
## lm(formula = peg.no2.centstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.05854 -0.54561 0.01599 0.52896 2.90550
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.306254 0.510290 -2.560 0.010576 *
## birth.pm10 0.042167 0.008098 5.207 2.2e-07 ***
## age.dnam 0.007762 0.007318 1.061 0.289036
## sexm 0.152299 0.044638 3.412 0.000663 ***
## matrace.factorNon-Hispanic Black 0.139726 0.064978 2.150 0.031697 *
## matrace.factorHispanic -0.287773 0.077981 -3.690 0.000232 ***
## matrace.factorOther -0.029005 0.131584 -0.220 0.825570
## cm1inpov -0.010747 0.010554 -1.018 0.308754
## m1b2 0.017284 0.061581 0.281 0.779000
## Epithelial.cells 1.248591 0.466175 2.678 0.007484 **
## Leukocytes 0.379386 0.435015 0.872 0.383290
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8355 on 1414 degrees of freedom
## (117 observations deleted due to missingness)
## Multiple R-squared: 0.1161, Adjusted R-squared: 0.1098
## F-statistic: 18.56 on 10 and 1414 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.no2.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="C",])
summary(mod.a9)
##
## Call:
## lm(formula = peg.no2.centstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "C", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.10860 -0.53508 0.01444 0.47567 2.46999
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.864030 1.165512 -1.599 0.110214
## birth.pm10 0.043011 0.011188 3.844 0.000132 ***
## age.dnam 0.077236 0.102916 0.750 0.453226
## sexm 0.066435 0.062204 1.068 0.285897
## matrace.factorNon-Hispanic Black 0.206750 0.090609 2.282 0.022811 *
## matrace.factorHispanic -0.229851 0.108614 -2.116 0.034690 *
## matrace.factorOther 0.025174 0.186042 0.135 0.892404
## cm1inpov -0.005561 0.014752 -0.377 0.706300
## m1b2 0.060921 0.085949 0.709 0.478690
## Epithelial.cells 1.260604 0.668683 1.885 0.059829 .
## Leukocytes 0.189314 0.615771 0.307 0.758602
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8108 on 679 degrees of freedom
## (59 observations deleted due to missingness)
## Multiple R-squared: 0.1254, Adjusted R-squared: 0.1125
## F-statistic: 9.735 on 10 and 679 DF, p-value: 2.696e-15
mod.a15<-lm(peg.no2.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="T",])
summary(mod.a15)
##
## Call:
## lm(formula = peg.no2.centstd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "T", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.08166 -0.56316 0.01064 0.57230 3.00735
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.13399 1.39380 -2.249 0.024843 *
## birth.pm10 0.03942 0.01186 3.323 0.000935 ***
## age.dnam 0.13078 0.08030 1.629 0.103849
## sexm 0.22609 0.06419 3.522 0.000455 ***
## matrace.factorNon-Hispanic Black 0.07770 0.09346 0.831 0.406012
## matrace.factorHispanic -0.34444 0.11216 -3.071 0.002214 **
## matrace.factorOther -0.06147 0.18638 -0.330 0.741628
## cm1inpov -0.01273 0.01517 -0.839 0.401610
## m1b2 -0.02351 0.08815 -0.267 0.789808
## Epithelial.cells 1.20426 0.65641 1.835 0.066972 .
## Leukocytes 0.45539 0.61739 0.738 0.460994
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8589 on 724 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.117, Adjusted R-squared: 0.1048
## F-statistic: 9.591 on 10 and 724 DF, p-value: 4.143e-15
output$IQRcoef.c[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.c[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.c[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.c[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Centered & Scaled
mod<-lm(peg.no2.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include)
summary(mod)
##
## Call:
## lm(formula = peg.no2.centscalestd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.30172 -0.46377 -0.00722 0.41788 2.25901
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.8488792 0.3958191 -4.671 3.26e-06 ***
## birth.pm25 0.0011752 0.0025231 0.466 0.6414
## age.dnam 0.0002081 0.0057679 0.036 0.9712
## sexm 0.0747058 0.0353614 2.113 0.0348 *
## matrace.factorNon-Hispanic Black 0.1311720 0.0524018 2.503 0.0124 *
## matrace.factorHispanic -0.2547912 0.0601414 -4.237 2.41e-05 ***
## matrace.factorOther 0.0088049 0.1035980 0.085 0.9323
## cm1inpov -0.0084731 0.0084172 -1.007 0.3143
## m1b2 -0.0027523 0.0480155 -0.057 0.9543
## Epithelial.cells 1.5992350 0.3676708 4.350 1.45e-05 ***
## Leukocytes 1.6185804 0.3432978 4.715 2.64e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6897 on 1531 degrees of freedom
## Multiple R-squared: 0.06175, Adjusted R-squared: 0.05562
## F-statistic: 10.08 on 10 and 1531 DF, p-value: < 2.2e-16
summary(mod)$coef[2,4]
## [1] 0.6414344
mod.a9<-lm(peg.no2.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="C",])
summary(mod.a9)
##
## Call:
## lm(formula = peg.no2.centscalestd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "C", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.99697 -0.43871 -0.03127 0.38522 2.04435
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.669007 0.892013 -2.992 0.002863 **
## birth.pm25 0.004219 0.003674 1.148 0.251245
## age.dnam 0.048201 0.076649 0.629 0.529634
## sexm 0.019338 0.049479 0.391 0.696030
## matrace.factorNon-Hispanic Black 0.180980 0.073412 2.465 0.013918 *
## matrace.factorHispanic -0.218473 0.084750 -2.578 0.010135 *
## matrace.factorOther 0.064840 0.145589 0.445 0.656185
## cm1inpov -0.004628 0.011820 -0.392 0.695493
## m1b2 0.026967 0.067339 0.400 0.688930
## Epithelial.cells 2.004571 0.533149 3.760 0.000183 ***
## Leukocytes 1.815548 0.492142 3.689 0.000242 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6725 on 738 degrees of freedom
## Multiple R-squared: 0.07172, Adjusted R-squared: 0.05914
## F-statistic: 5.702 on 10 and 738 DF, p-value: 2.873e-08
mod.a15<-lm(peg.no2.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="T",])
summary(mod.a15)
##
## Call:
## lm(formula = peg.no2.centscalestd ~ birth.pm25 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "T", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.36812 -0.48011 -0.01618 0.44083 2.32274
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.3970113 0.9803638 -2.445 0.014704 *
## birth.pm25 -0.0006332 0.0036412 -0.174 0.861994
## age.dnam 0.0594826 0.0526832 1.129 0.259218
## sexm 0.1250123 0.0506804 2.467 0.013851 *
## matrace.factorNon-Hispanic Black 0.0812555 0.0753603 1.078 0.281265
## matrace.factorHispanic -0.3006442 0.0866863 -3.468 0.000553 ***
## matrace.factorOther -0.0335218 0.1476035 -0.227 0.820400
## cm1inpov -0.0102014 0.0121093 -0.842 0.399799
## m1b2 -0.0250722 0.0687664 -0.365 0.715509
## Epithelial.cells 1.2482404 0.5143876 2.427 0.015464 *
## Leukocytes 1.3852411 0.4837677 2.863 0.004303 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7067 on 782 degrees of freedom
## Multiple R-squared: 0.06265, Adjusted R-squared: 0.05066
## F-statistic: 5.226 on 10 and 782 DF, p-value: 1.862e-07
output$IQRcoef.cs[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.cs[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.cs[1:3] <- IQR(include$birth.pm25, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.cs[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(peg.no2.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include)
summary(mod)
##
## Call:
## lm(formula = peg.no2.centscalestd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.40944 -0.46484 -0.00787 0.42322 2.29614
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.3836205 0.4174824 -5.710 1.38e-08 ***
## birth.pm10 0.0315930 0.0066253 4.769 2.05e-06 ***
## age.dnam 0.0005325 0.0059874 0.089 0.92915
## sexm 0.0716567 0.0365199 1.962 0.04994 *
## matrace.factorNon-Hispanic Black 0.0956426 0.0531605 1.799 0.07221 .
## matrace.factorHispanic -0.1897668 0.0637983 -2.974 0.00298 **
## matrace.factorOther 0.0237347 0.1076523 0.220 0.82553
## cm1inpov -0.0072938 0.0086348 -0.845 0.39842
## m1b2 -0.0062045 0.0503813 -0.123 0.90201
## Epithelial.cells 1.7122865 0.3813907 4.490 7.72e-06 ***
## Leukocytes 1.7128364 0.3558979 4.813 1.65e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6835 on 1414 degrees of freedom
## (117 observations deleted due to missingness)
## Multiple R-squared: 0.07681, Adjusted R-squared: 0.07028
## F-statistic: 11.76 on 10 and 1414 DF, p-value: < 2.2e-16
mod.a9<-lm(peg.no2.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="C",])
summary(mod.a9)
##
## Call:
## lm(formula = peg.no2.centscalestd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "C", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.91032 -0.43732 -0.02557 0.38024 2.10800
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.343310 0.954806 -3.502 0.000493 ***
## birth.pm10 0.033966 0.009165 3.706 0.000228 ***
## age.dnam 0.086506 0.084311 1.026 0.305241
## sexm 0.014025 0.050959 0.275 0.783231
## matrace.factorNon-Hispanic Black 0.163745 0.074228 2.206 0.027721 *
## matrace.factorHispanic -0.134588 0.088979 -1.513 0.130850
## matrace.factorOther 0.077781 0.152408 0.510 0.609975
## cm1inpov -0.001996 0.012085 -0.165 0.868842
## m1b2 0.027099 0.070411 0.385 0.700457
## Epithelial.cells 1.900791 0.547796 3.470 0.000554 ***
## Leukocytes 1.739196 0.504450 3.448 0.000600 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6642 on 679 degrees of freedom
## (59 observations deleted due to missingness)
## Multiple R-squared: 0.08932, Adjusted R-squared: 0.07591
## F-statistic: 6.66 on 10 and 679 DF, p-value: 6.568e-10
mod.a15<-lm(peg.no2.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, data=include[include$childteen=="T",])
summary(mod.a15)
##
## Call:
## lm(formula = peg.no2.centscalestd ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes,
## data = include[include$childteen == "T", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.47096 -0.47661 -0.01199 0.45934 2.36221
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.132700 1.140287 -2.747 0.00616 **
## birth.pm10 0.028529 0.009706 2.939 0.00339 **
## age.dnam 0.065364 0.065699 0.995 0.32011
## sexm 0.123385 0.052513 2.350 0.01906 *
## matrace.factorNon-Hispanic Black 0.035567 0.076457 0.465 0.64194
## matrace.factorHispanic -0.244662 0.091761 -2.666 0.00784 **
## matrace.factorOther -0.016594 0.152484 -0.109 0.91337
## cm1inpov -0.010232 0.012414 -0.824 0.41006
## m1b2 -0.037833 0.072116 -0.525 0.60001
## Epithelial.cells 1.518806 0.537019 2.828 0.00481 **
## Leukocytes 1.610886 0.505096 3.189 0.00149 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7027 on 724 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.07534, Adjusted R-squared: 0.06257
## F-statistic: 5.899 on 10 and 724 DF, p-value: 1.322e-08
output$IQRcoef.cs[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.cs[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.cs[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.cs[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Output
output
## Exposure Age N IQRcoef.r IQRlcl.r IQRucl.r pval.r IQRcoef.c
## 1 PM2.5 All 1542 0.03712733 -0.02831184 0.1025665 2.659356e-01 0.03712733
## 2 PM2.5 9 749 0.05177918 -0.04328371 0.1468421 2.852780e-01 0.05177918
## 3 PM2.5 15 793 0.03059005 -0.06417935 0.1253594 5.265104e-01 0.03059005
## 4 PM10 All 1425 0.13592796 0.08471987 0.1871360 2.202121e-07 0.13592796
## 5 PM10 9 690 0.13864855 0.06783590 0.2094612 1.322082e-04 0.13864855
## 6 PM10 15 735 0.12708576 0.05200450 0.2021670 9.350787e-04 0.12708576
## IQRlcl.c IQRucl.c pval.c IQRcoef.cs IQRlcl.cs IQRucl.cs
## 1 -0.02831184 0.1025665 2.659356e-01 0.012624418 -0.04053935 0.06578819
## 2 -0.04328371 0.1468421 2.852780e-01 0.045315217 -0.03216229 0.12279272
## 3 -0.06417935 0.1253594 5.265104e-01 -0.006801588 -0.08358161 0.06997843
## 4 0.08471987 0.1871360 2.202121e-07 0.101841337 0.05994654 0.14373613
## 5 0.06783590 0.2094612 1.322082e-04 0.109489883 0.05147904 0.16750072
## 6 0.05200450 0.2021670 9.350787e-04 0.091963187 0.03053807 0.15338830
## pval.cs
## 1 6.414344e-01
## 2 2.512452e-01
## 3 8.619943e-01
## 4 2.047482e-06
## 5 2.278436e-04
## 6 3.394323e-03
write.csv(output, file=here("Output",paste0("FFCW_AirPoll_Std_PEG_Regression_NO2_Sens_", date, ".csv")) )
output<-data.frame(matrix(nrow=6, ncol= 15))
colnames(output) <- c("Exposure", "cg", "N", "IQRcoef.r", "IQRlcl.r", "IQRucl.r", "pval.r", "IQRcoef.c", "IQRlcl.c", "IQRucl.c", "pval.c", "IQRcoef.cs", "IQRlcl.cs", "IQRucl.cs", "pval.cs")
output$Exposure <- c(rep("PM10", 6))
output$cg <- c("cg00905156", "cg06849931", "cg15082635", "cg18640183", "cg20340716", "cg24127244")
IQR(include$birth.pm10, na.rm=T)
## [1] 3.223546
### Raw
mod<-lm(cg00905156.percent ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2.factor + Epithelial.cells + Leukocytes, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = cg00905156.percent ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2.factor + Epithelial.cells +
## Leukocytes, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.6818 -0.7848 -0.2941 0.4620 25.4124
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.459437 2.633850 -0.174 0.8616
## birth.pm10 -0.015013 0.022559 -0.665 0.5060
## age.dnam 0.063853 0.152700 0.418 0.6760
## sexm 0.005107 0.122053 0.042 0.9666
## matrace.factorNon-Hispanic Black -0.035106 0.177706 -0.198 0.8435
## matrace.factorHispanic -0.003828 0.213275 -0.018 0.9857
## matrace.factorOther -0.356310 0.354412 -1.005 0.3151
## cm1inpov -0.045678 0.028853 -1.583 0.1138
## m1b2.factorNot Married -0.207580 0.167615 -1.238 0.2160
## Epithelial.cells 1.312004 1.248171 1.051 0.2935
## Leukocytes 2.599711 1.173973 2.214 0.0271 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.633 on 724 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.02861, Adjusted R-squared: 0.01519
## F-statistic: 2.132 on 10 and 724 DF, p-value: 0.02019
mod.a9<-lm(cg06849931.percent ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2.factor + Epithelial.cells + Leukocytes, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = cg06849931.percent ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2.factor + Epithelial.cells +
## Leukocytes, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -14.6120 -2.9204 0.2248 2.8225 14.3182
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -17.16747 7.15281 -2.400 0.0166 *
## birth.pm10 0.04948 0.06126 0.808 0.4195
## age.dnam -0.31557 0.41469 -0.761 0.4469
## sexm -0.79892 0.33146 -2.410 0.0162 *
## matrace.factorNon-Hispanic Black -0.37994 0.48260 -0.787 0.4314
## matrace.factorHispanic -0.06272 0.57920 -0.108 0.9138
## matrace.factorOther 0.55109 0.96249 0.573 0.5671
## cm1inpov 0.02989 0.07836 0.381 0.7030
## m1b2.factorNot Married 0.08895 0.45520 0.195 0.8451
## Epithelial.cells 13.45759 3.38969 3.970 7.9e-05 ***
## Leukocytes 94.56616 3.18819 29.661 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.435 on 724 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.9061, Adjusted R-squared: 0.9048
## F-statistic: 698.4 on 10 and 724 DF, p-value: < 2.2e-16
mod.a15<-lm(cg15082635.percent ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2.factor + Epithelial.cells + Leukocytes, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = cg15082635.percent ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2.factor + Epithelial.cells +
## Leukocytes, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5459 -0.5524 -0.2337 0.3183 4.7566
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.285277 1.412659 -0.202 0.8400
## birth.pm10 -0.002744 0.012100 -0.227 0.8207
## age.dnam 0.080975 0.081900 0.989 0.3231
## sexm 0.077026 0.065463 1.177 0.2397
## matrace.factorNon-Hispanic Black -0.213750 0.095312 -2.243 0.0252 *
## matrace.factorHispanic -0.228922 0.114390 -2.001 0.0457 *
## matrace.factorOther -0.453005 0.190088 -2.383 0.0174 *
## cm1inpov -0.037550 0.015475 -2.426 0.0155 *
## m1b2.factorNot Married 0.023873 0.089900 0.266 0.7907
## Epithelial.cells 0.502920 0.669453 0.751 0.4528
## Leukocytes 1.374138 0.629658 2.182 0.0294 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.876 on 724 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.0535, Adjusted R-squared: 0.04043
## F-statistic: 4.093 on 10 and 724 DF, p-value: 1.674e-05
output$N[1:3] <- c(nrow(model.frame(mod)), nrow(model.frame(mod.a9)), nrow(model.frame(mod.a15)))
output$IQRcoef.r[1:3] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.r[1:3] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.r[1:3] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.r[1:3] <-c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
mod<-lm(cg18640183.percent ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2.factor + Epithelial.cells + Leukocytes, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod)
##
## Call:
## lm(formula = cg18640183.percent ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2.factor + Epithelial.cells +
## Leukocytes, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.1911 -0.8247 -0.2455 0.6078 7.2358
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.306206 1.939296 2.736 0.00637 **
## birth.pm10 -0.036864 0.016610 -2.219 0.02677 *
## age.dnam 0.159695 0.112433 1.420 0.15593
## sexm 0.045519 0.089867 0.507 0.61265
## matrace.factorNon-Hispanic Black -0.246146 0.130844 -1.881 0.06034 .
## matrace.factorHispanic -0.271892 0.157034 -1.731 0.08380 .
## matrace.factorOther -0.433517 0.260952 -1.661 0.09709 .
## cm1inpov -0.009308 0.021244 -0.438 0.66142
## m1b2.factorNot Married 0.020652 0.123415 0.167 0.86715
## Epithelial.cells -1.142799 0.919024 -1.243 0.21409
## Leukocytes -2.083069 0.864393 -2.410 0.01621 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.203 on 724 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.03549, Adjusted R-squared: 0.02216
## F-statistic: 2.664 on 10 and 724 DF, p-value: 0.003354
mod.a9<-lm(cg20340716.percent ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2.factor + Epithelial.cells + Leukocytes, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a9)
##
## Call:
## lm(formula = cg20340716.percent ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2.factor + Epithelial.cells +
## Leukocytes, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.6644 -0.8078 0.0979 0.9102 3.1862
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 93.23108 2.01395 46.293 < 2e-16 ***
## birth.pm10 0.04188 0.01725 2.428 0.01542 *
## age.dnam -0.12456 0.11676 -1.067 0.28640
## sexm -0.03623 0.09333 -0.388 0.69794
## matrace.factorNon-Hispanic Black 0.07472 0.13588 0.550 0.58257
## matrace.factorHispanic 0.37330 0.16308 2.289 0.02236 *
## matrace.factorOther 0.02934 0.27100 0.108 0.91380
## cm1inpov -0.03718 0.02206 -1.685 0.09240 .
## m1b2.factorNot Married -0.19496 0.12817 -1.521 0.12866
## Epithelial.cells 2.75288 0.95440 2.884 0.00404 **
## Leukocytes 0.86208 0.89767 0.960 0.33720
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.249 on 724 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.07091, Adjusted R-squared: 0.05807
## F-statistic: 5.525 on 10 and 724 DF, p-value: 5.912e-08
mod.a15<-lm(cg24127244.percent ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2.factor + Epithelial.cells + Leukocytes, na.option=na.exclude, data=include[include$childteen=="T",])
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
## extra argument 'na.option' will be disregarded
summary(mod.a15)
##
## Call:
## lm(formula = cg24127244.percent ~ birth.pm10 + age.dnam + sex +
## matrace.factor + cm1inpov + m1b2.factor + Epithelial.cells +
## Leukocytes, data = include[include$childteen == "T", ], na.option = na.exclude)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6055 -0.4770 -0.1223 0.3112 2.8966
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.001030 1.128445 1.773 0.07661 .
## birth.pm10 -0.004704 0.009665 -0.487 0.62666
## age.dnam -0.036054 0.065423 -0.551 0.58174
## sexm -0.052209 0.052292 -0.998 0.31842
## matrace.factorNon-Hispanic Black -0.151162 0.076136 -1.985 0.04747 *
## matrace.factorHispanic -0.184366 0.091376 -2.018 0.04399 *
## matrace.factorOther -0.185906 0.151844 -1.224 0.22123
## cm1inpov -0.019495 0.012362 -1.577 0.11522
## m1b2.factorNot Married -0.014424 0.071813 -0.201 0.84087
## Epithelial.cells 0.605106 0.534765 1.132 0.25820
## Leukocytes 1.385943 0.502976 2.755 0.00601 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6997 on 724 degrees of freedom
## (58 observations deleted due to missingness)
## Multiple R-squared: 0.05462, Adjusted R-squared: 0.04156
## F-statistic: 4.183 on 10 and 724 DF, p-value: 1.181e-05
output$N[4:6] <- c(nrow(model.frame(mod)), nrow(model.frame(mod.a9)), nrow(model.frame(mod.a15)))
output$IQRcoef.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(mod$coefficients[2], mod.a9$coefficients[2], mod.a15$coefficients[2])
output$IQRlcl.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,1], confint(mod.a9)[2,1], confint(mod.a15)[2,1])
output$IQRucl.r[4:6] <- IQR(include$birth.pm10, na.rm=T) * c(confint(mod)[2,2], confint(mod.a9)[2,2], confint(mod.a15)[2,2])
output$pval.r[4:6] <- c(summary(mod)$coef[2,4], summary(mod.a9)$coef[2,4], summary(mod.a15)$coef[2,4])
### Output
output
## Exposure cg N IQRcoef.r IQRlcl.r IQRucl.r pval.r
## 1 PM10 cg00905156 735 -0.048393632 -0.19116133 0.09437406 0.5059575
## 2 PM10 cg06849931 735 0.159508407 -0.22820947 0.54722629 0.4195367
## 3 PM10 cg15082635 735 -0.008844694 -0.08541779 0.06772840 0.8206683
## 4 PM10 cg18640183 735 -0.118834270 -0.22395368 -0.01371486 0.0267694
## 5 PM10 cg20340716 735 0.135010777 0.02584494 0.24417661 0.0154232
## 6 PM10 cg24127244 735 -0.015162089 -0.07632940 0.04600522 0.6266555
## IQRcoef.c IQRlcl.c IQRucl.c pval.c IQRcoef.cs IQRlcl.cs IQRucl.cs pval.cs
## 1 NA NA NA NA NA NA NA NA
## 2 NA NA NA NA NA NA NA NA
## 3 NA NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA NA
write.csv(output, file=here("Output",paste0("FFCW_AirPoll_SingleSite_Regression_Sens_Age15_PM10_", date, ".csv")) )
head(include) # Use idnum as my random effect. Random intercept only.
## idnum MethID childteen ck6ethrace cm1ethrace ethrace m1city
## 1 1000002 3999984114_R01C02 T 2 2 2 1
## 2 1000002 3999984114_R02C02 C 2 2 2 1
## 3 1000005 3999932091_R04C02 C 2 2 2 1
## 4 1000005 3999932092_R04C02 T 2 2 2 1
## 5 1000019 3999932091_R01C01 C 2 2 2 1
## 6 1000019 3999932092_R01C01 T 2 2 2 1
## cm1inpov probe_fail_pct sex age plate cut immune epithelial cm1edu m1b2
## 1 2.4 0.005142331 f 194 2 0.8119736 1.880264e-01 1 2
## 2 2.4 0.022177233 f 117 2 1.0000000 -1.387779e-17 1 2
## 3 0.5 0.037646589 f 116 6 1.0000000 0.000000e+00 2 2
## 4 0.5 0.014520544 f 194 6 0.8172765 1.827235e-01 2 2
## 5 0.3 0.021679759 m 118 6 1.0000000 0.000000e+00 1 2
## 6 0.3 0.024064100 m 200 6 1.0000000 0.000000e+00 1 2
## peg.pm25.raw peg.pm10.raw peg.no2.raw peg.pm25.cent peg.pm10.cent
## 1 -0.01197784 -0.002321927 -0.004139335 5.981487e-04 1.297578e-04
## 2 -0.01221065 -0.002468995 -0.003662677 3.653364e-04 -1.731028e-05
## 3 -0.01260724 -0.002521653 -0.004819069 -3.125533e-05 -6.996767e-05
## 4 -0.01230936 -0.002361226 -0.005083212 2.666311e-04 9.045947e-05
## 5 -0.01245799 -0.002563784 -0.003486199 1.179929e-04 -1.120985e-04
## 6 -0.01275699 -0.002626098 -0.002173911 -1.810042e-04 -1.744129e-04
## peg.no2.cent peg.pm25.centscale peg.pm10.centscale peg.no2.centscale
## 1 1.005331e-03 0.006359692 5.492113e-04 0.014495957
## 2 1.481989e-03 0.003628842 -3.870897e-04 0.022967084
## 3 3.255975e-04 -0.002516903 -2.381435e-03 0.007047334
## 4 6.145456e-05 0.001455718 -3.849743e-05 0.003577413
## 5 1.658467e-03 0.002407788 -9.189505e-04 0.030509673
## 6 2.970755e-03 -0.003497852 -1.530059e-03 0.049893402
## cg18640183 cg24127244 cg00905156 cg15082635 cg06849931 cg20340716
## 1 0.05230433 0.02252754 0.02103662 0.02077820 0.5820260 0.9282739
## 2 0.05154276 0.02162791 0.02367230 0.01468084 0.7376557 0.9214317
## 3 0.03810300 0.01497054 0.01343715 0.01371734 0.7065934 0.9476437
## 4 0.04436995 0.02591302 0.02153345 0.01652054 0.6033457 0.9331084
## 5 0.05221866 0.02034587 0.01835185 0.01634140 0.8437224 0.9136594
## 6 0.04878337 0.01992653 0.01950365 0.01465849 0.8974772 0.9157463
## Epithelial.cells Leukocytes age.dnam peg.pm25.rawstd peg.pm10.rawstd
## 1 1.721681e-01 0.7876077 16.166667 1.01022672 0.50563793
## 2 -1.387779e-17 0.9908079 9.750000 0.61702476 -0.06745438
## 3 0.000000e+00 1.0385861 9.666667 -0.05278783 -0.27264880
## 4 1.804163e-01 0.8137317 16.166667 0.45031912 0.35250088
## 5 0.000000e+00 1.0904245 9.833333 0.19928082 -0.43682360
## 6 0.000000e+00 1.1385057 16.666667 -0.30570207 -0.67964897
## peg.no2.rawstd peg.pm25.centstd peg.pm10.centstd peg.no2.centstd
## 1 0.75000405 1.01022672 0.50563793 0.75000405
## 2 1.10560349 0.61702476 -0.06745438 1.10560349
## 3 0.24290440 -0.05278783 -0.27264880 0.24290440
## 4 0.04584674 0.45031912 0.35250088 0.04584674
## 5 1.23726055 0.19928082 -0.43682360 1.23726055
## 6 2.21626254 -0.30570207 -0.67964897 2.21626254
## peg.pm25.centscalestd peg.pm10.centscalestd peg.no2.centscalestd
## 1 0.6250130 0.095720013 0.5490042
## 2 0.3566326 -0.067464438 0.8698305
## 3 -0.2473542 -0.415051458 0.2669031
## 4 0.1430639 -0.006709575 0.1354871
## 5 0.2366308 -0.160160480 1.1554903
## 6 -0.3437592 -0.266668345 1.8896087
## birth_pseudtract birth.pm25 birth.pm10 age1_pseudtract age1.pm25 age1.pm10
## 1 2089 18.87445 NA 2089 22.04215 11.062638
## 2 2089 18.87445 NA 2089 22.04215 11.062638
## 3 4042 18.00709 NA 4042 20.35600 8.967897
## 4 4042 18.00709 NA 4042 20.35600 8.967897
## 5 4070 15.80071 NA 4070 19.82025 9.275654
## 6 4070 15.80071 NA 4070 19.82025 9.275654
## age3_pseudtract age3.pm25 age3.pm10 methid0 childteen0 cm5b_age
## 1 2089 22.44949 13.849589 3999984114_R02C02 C 117
## 2 2089 22.44949 13.849589 3999984114_R02C02 C 117
## 3 4499 14.54962 7.848451 3999932091_R04C02 C 116
## 4 4499 14.54962 7.848451 3999932091_R04C02 C 116
## 5 2971 22.05678 9.214114 3999932091_R01C01 C 118
## 6 2971 22.05678 9.214114 3999932091_R01C01 C 118
## cm5b_ageyrs cp6yagey cp6yagem ck6yagey ck6yagem qc_flag_any0 restoration0
## 1 9.65 16 194 16 194 FALSE FALSE
## 2 9.65 16 194 16 194 FALSE FALSE
## 3 9.55 16 194 16 194 FALSE FALSE
## 4 9.55 16 194 16 194 FALSE FALSE
## 5 9.73 17 200 17 200 FALSE FALSE
## 6 9.73 17 200 17 200 FALSE FALSE
## staining_green0 staining_red0 extension_green0 extension_red0
## 1 FALSE FALSE FALSE FALSE
## 2 FALSE FALSE FALSE FALSE
## 3 FALSE FALSE FALSE FALSE
## 4 FALSE FALSE FALSE FALSE
## 5 FALSE FALSE FALSE FALSE
## 6 FALSE FALSE FALSE FALSE
## hybridization_highmedium0 hybridization_mediumlow0 target_removal_10
## 1 FALSE FALSE FALSE
## 2 FALSE FALSE FALSE
## 3 FALSE FALSE FALSE
## 4 FALSE FALSE FALSE
## 5 FALSE FALSE FALSE
## 6 FALSE FALSE FALSE
## target_removal_20 bisulfite_conversion_i_green0 bisulfite_conversion_i_red0
## 1 FALSE FALSE FALSE
## 2 FALSE FALSE FALSE
## 3 FALSE FALSE FALSE
## 4 FALSE FALSE FALSE
## 5 FALSE FALSE FALSE
## 6 FALSE FALSE FALSE
## bisulfite_conversion_ii0 specificity_i_green0 specificity_i_red0
## 1 FALSE FALSE FALSE
## 2 FALSE FALSE FALSE
## 3 FALSE FALSE FALSE
## 4 FALSE FALSE FALSE
## 5 FALSE FALSE FALSE
## 6 FALSE FALSE FALSE
## specificity_ii0 nonpolymorphic_green0 nonpolymorphic_red0 x0
## 1 FALSE FALSE FALSE 1.0828574
## 2 FALSE FALSE FALSE 1.0828574
## 3 FALSE FALSE FALSE 1.0700698
## 4 FALSE FALSE FALSE 1.0700698
## 5 FALSE FALSE FALSE 0.7313603
## 6 FALSE FALSE FALSE 0.7313603
## y0 sex0 predicted_sex0 predicted_sex_outlier0 probe_fail_pct0
## 1 0.10200305 f f FALSE 0.02217723
## 2 0.10200305 f f FALSE 0.02217723
## 3 0.09623082 f f FALSE 0.03764659
## 4 0.09623082 f f FALSE 0.03764659
## 5 0.83475864 m m FALSE 0.02167976
## 6 0.83475864 m m FALSE 0.02167976
## probe_fail_100 probe_fail_050 snp_guess0 snp_logodd_outlier0 snp_unexpected0
## 1 FALSE FALSE 638 -5.063077 FALSE
## 2 FALSE FALSE 638 -5.063077 FALSE
## 3 FALSE FALSE 552 -4.888753 FALSE
## 4 FALSE FALSE 552 -4.888753 FALSE
## 5 FALSE FALSE 545 -5.292545 FALSE
## 6 FALSE FALSE 545 -5.292545 FALSE
## mqc0 uqc0 low_int0 bad_sample0 horvath_clock_20130
## 1 11.78218 12.27845 FALSE 0 9.822213
## 2 11.78218 12.27845 FALSE 0 9.822213
## 3 11.47725 11.93590 FALSE 0 7.441843
## 4 11.47725 11.93590 FALSE 0 7.441843
## 5 11.66400 12.24615 FALSE 0 14.019331
## 6 11.66400 12.24615 FALSE 0 14.019331
## horvath_clock_20180 levine_clock_20180 pediatric0 bmi_hamilton0
## 1 6.946498 4.472997 8.770975 4.558525
## 2 6.946498 4.472997 8.770975 4.558525
## 3 7.402976 10.815426 8.716650 8.378462
## 4 7.402976 10.815426 8.716650 8.378462
## 5 10.083214 2.967176 9.721045 4.438685
## 6 10.083214 2.967176 9.721045 4.438685
## bmi_mccartney0 bmi_wahl0 smoke0 tnfa0 particles0 momsmoke0
## 1 -0.7955942 491.5261 -13.20036 0.01191998 -0.003662677 2.634444
## 2 -0.7955942 491.5261 -13.20036 0.01191998 -0.003662677 2.634444
## 3 -0.6219595 496.2639 -12.91928 0.01306847 -0.004819069 2.612985
## 4 -0.6219595 496.2639 -12.91928 0.01306847 -0.004819069 2.612985
## 5 -0.6217506 502.1522 -14.28656 -0.01103089 -0.003486200 2.612230
## 6 -0.6217506 502.1522 -14.28656 -0.01103089 -0.003486200 2.612230
## mombmi0 inflammation0 methid1 childteen1 qc_flag_any1
## 1 -0.02699954 0.04969880 3999984114_R01C02 T FALSE
## 2 -0.02699954 0.04969880 3999984114_R01C02 T FALSE
## 3 -0.02932119 0.04437617 3999932092_R04C02 T FALSE
## 4 -0.02932119 0.04437617 3999932092_R04C02 T FALSE
## 5 -0.02986765 0.03602437 3999932092_R01C01 T FALSE
## 6 -0.02986765 0.03602437 3999932092_R01C01 T FALSE
## restoration1 staining_green1 staining_red1 extension_green1 extension_red1
## 1 FALSE FALSE NA FALSE FALSE
## 2 FALSE FALSE NA FALSE FALSE
## 3 FALSE FALSE FALSE FALSE FALSE
## 4 FALSE FALSE FALSE FALSE FALSE
## 5 FALSE FALSE FALSE FALSE FALSE
## 6 FALSE FALSE FALSE FALSE FALSE
## hybridization_highmedium1 hybridization_mediumlow1 target_removal_11
## 1 FALSE FALSE FALSE
## 2 FALSE FALSE FALSE
## 3 FALSE FALSE FALSE
## 4 FALSE FALSE FALSE
## 5 FALSE FALSE FALSE
## 6 FALSE FALSE FALSE
## target_removal_21 bisulfite_conversion_i_green1 bisulfite_conversion_i_red1
## 1 FALSE FALSE FALSE
## 2 FALSE FALSE FALSE
## 3 FALSE FALSE FALSE
## 4 FALSE FALSE FALSE
## 5 FALSE FALSE FALSE
## 6 FALSE FALSE FALSE
## bisulfite_conversion_ii1 specificity_i_green1 specificity_i_red1
## 1 FALSE FALSE FALSE
## 2 FALSE FALSE FALSE
## 3 FALSE FALSE FALSE
## 4 FALSE FALSE FALSE
## 5 FALSE FALSE FALSE
## 6 FALSE FALSE FALSE
## specificity_ii1 nonpolymorphic_green1 nonpolymorphic_red1 x1
## 1 FALSE FALSE FALSE 1.1083698
## 2 FALSE FALSE FALSE 1.1083698
## 3 FALSE FALSE FALSE 1.0874372
## 4 FALSE FALSE FALSE 1.0874372
## 5 FALSE FALSE FALSE 0.7097321
## 6 FALSE FALSE FALSE 0.7097321
## y1 sex1 predicted_sex1 predicted_sex_outlier1 probe_fail_pct1
## 1 0.09767087 f f FALSE 0.005142331
## 2 0.09767087 f f FALSE 0.005142331
## 3 0.08934078 f f FALSE 0.014520544
## 4 0.08934078 f f FALSE 0.014520544
## 5 0.83383358 m m FALSE 0.024064099
## 6 0.83383358 m m FALSE 0.024064099
## probe_fail_101 probe_fail_051 snp_guess1 snp_logodd_outlier1 snp_unexpected1
## 1 FALSE FALSE 638 -5.308726 FALSE
## 2 FALSE FALSE 638 -5.308726 FALSE
## 3 FALSE FALSE 552 -5.063976 FALSE
## 4 FALSE FALSE 552 -5.063976 FALSE
## 5 FALSE FALSE 545 -4.972307 FALSE
## 6 FALSE FALSE 545 -4.972307 FALSE
## mqc1 uqc1 low_int1 bad_sample1 horvath_clock_20131
## 1 12.01472 12.56914 FALSE 0 16.06603
## 2 12.01472 12.56914 FALSE 0 16.06603
## 3 12.06002 12.54037 FALSE 0 12.81881
## 4 12.06002 12.54037 FALSE 0 12.81881
## 5 11.63708 12.14689 FALSE 0 20.83949
## 6 11.63708 12.14689 FALSE 0 20.83949
## horvath_clock_20181 levine_clock_20181 pediatric1 idnum21 list1 bmi_hamilton1
## 1 14.47595 17.53386 12.43236 1000002 1500 7.330503
## 2 14.47595 17.53386 12.43236 1000002 1500 7.330503
## 3 13.29797 18.26464 12.37133 1000005 1341 8.750580
## 4 13.29797 18.26464 12.37133 1000005 1341 8.750580
## 5 16.49349 17.00538 10.89212 1000019 1335 3.757208
## 6 16.49349 17.00538 10.89212 1000019 1335 3.757208
## bmi_mccartney1 bmi_wahl1 smoke1 tnfa1 particles1 momsmoke1
## 1 -0.7542774 473.2941 -10.44782 0.01448388 -0.004139335 2.726711
## 2 -0.7542774 473.2941 -10.44782 0.01448388 -0.004139335 2.726711
## 3 -0.7252045 484.0722 -11.07321 0.01258851 -0.005083212 2.606195
## 4 -0.7252045 484.0722 -11.07321 0.01258851 -0.005083212 2.606195
## 5 -0.5783662 537.1475 -15.36230 -0.01093033 -0.002173911 2.603815
## 6 -0.5783662 537.1475 -15.36230 -0.01093033 -0.002173911 2.603815
## mombmi1 inflammation1 potbad race childsex female cm1relf cm2povco
## 1 -0.02566669 0.07408101 0 2 2 1 3 0.6
## 2 -0.02566669 0.07408101 0 2 2 1 3 0.6
## 3 -0.02728736 0.06852657 0 2 2 1 2 0.1
## 4 -0.02728736 0.06852657 0 2 2 1 2 0.1
## 5 -0.03069736 0.03647710 0 2 1 0 4 0.3
## 6 -0.03069736 0.03647710 0 2 1 0 4 0.3
## cm3povco cm4povco cm5povco cp6povco cf1ethrace ewastoolsleukocytes0
## 1 0.5 0.2 0.0000000 0.16062708 2 0.990808
## 2 0.5 0.2 0.0000000 0.16062708 2 0.990808
## 3 0.1 0.1 0.4318411 0.03105924 2 1.038586
## 4 0.1 0.1 0.4318411 0.03105924 2 1.038586
## 5 0.3 0.3 0.1799338 0.18683441 2 1.090425
## 6 0.3 0.3 0.1799338 0.18683441 2 1.090425
## ewastoolsepithelialcells0 epidishrpcepi0 epidishrpcfib0 epidishrpcic0
## 1 -1.387779e-17 0.2543087 0.02423720 0.7214541
## 2 -1.387779e-17 0.2543087 0.02423720 0.7214541
## 3 0.000000e+00 0.2990498 0.02308954 0.6778606
## 4 0.000000e+00 0.2990498 0.02308954 0.6778606
## 5 0.000000e+00 0.1458830 0.02784315 0.8262739
## 6 0.000000e+00 0.1458830 0.02784315 0.8262739
## epidishcbsepi0 epidishcbsfib0 epidishcbsic0 epidishcpepi0 epidishcpfib0
## 1 0.2496210 0.01722156 0.7331575 0.17778499 0.07339475
## 2 0.2496210 0.01722156 0.7331575 0.17778499 0.07339475
## 3 0.2862059 0.02414045 0.6896537 0.22135556 0.10390326
## 4 0.2862059 0.02414045 0.6896537 0.22135556 0.10390326
## 5 0.1404656 0.02146553 0.8380688 0.07960265 0.06765931
## 6 0.1404656 0.02146553 0.8380688 0.07960265 0.06765931
## epidishcpic0 ewastoolsleukocytes1 ewastoolsepithelialcells1 epidishrpcepi1
## 1 0.6284974 0.7876077 0.1721681 0.4684542
## 2 0.6284974 0.7876077 0.1721681 0.4684542
## 3 0.5998775 0.8137317 0.1804163 0.4434395
## 4 0.5998775 0.8137317 0.1804163 0.4434395
## 5 0.7217021 1.1385057 0.0000000 0.1112593
## 6 0.7217021 1.1385057 0.0000000 0.1112593
## epidishrpcfib1 epidishrpcic1 epidishcbsepi1 epidishcbsfib1 epidishcbsic1
## 1 0.00000000 0.5315458 0.4533455 0.00000000 0.5466545
## 2 0.00000000 0.5315458 0.4533455 0.00000000 0.5466545
## 3 0.00000000 0.5565605 0.4309103 0.00000000 0.5690897
## 4 0.00000000 0.5565605 0.4309103 0.00000000 0.5690897
## 5 0.02012005 0.8686206 0.1084706 0.01871887 0.8728105
## 6 0.02012005 0.8686206 0.1084706 0.01871887 0.8728105
## epidishcpepi1 epidishcpfib1 epidishcpic1 birth.pm10.na birth.pm25.na
## 1 0.34523654 0.07368201 0.4673083 Missing <NA>
## 2 0.34523654 0.07368201 0.4673083 Missing <NA>
## 3 0.32897812 0.08255456 0.4914306 Missing <NA>
## 4 0.32897812 0.08255456 0.4914306 Missing <NA>
## 5 0.04829928 0.06247644 0.7589061 Missing <NA>
## 6 0.04829928 0.06247644 0.7589061 Missing <NA>
## age1.pm10.na age1.pm25.na age3.pm10.na age3.pm25.na childethrace.factor
## 1 <NA> <NA> <NA> <NA> Non-Hispanic Black
## 2 <NA> <NA> <NA> <NA> Non-Hispanic Black
## 3 <NA> <NA> <NA> <NA> Non-Hispanic Black
## 4 <NA> <NA> <NA> <NA> Non-Hispanic Black
## 5 <NA> <NA> <NA> <NA> Non-Hispanic Black
## 6 <NA> <NA> <NA> <NA> Non-Hispanic Black
## matrace.factor m1b2.na m1b2.factor m1city.factor epithelial.percent
## 1 Non-Hispanic Black <NA> Not Married Oakland 1.880264e+01
## 2 Non-Hispanic Black <NA> Not Married Oakland -1.387779e-15
## 3 Non-Hispanic Black <NA> Not Married Oakland 0.000000e+00
## 4 Non-Hispanic Black <NA> Not Married Oakland 1.827235e+01
## 5 Non-Hispanic Black <NA> Not Married Oakland 0.000000e+00
## 6 Non-Hispanic Black <NA> Not Married Oakland 0.000000e+00
## immune.percent cg00905156.percent cg06849931.percent cg15082635.percent
## 1 81.19736 2.103662 58.20260 2.077820
## 2 100.00000 2.367230 73.76557 1.468084
## 3 100.00000 1.343715 70.65934 1.371734
## 4 81.72765 2.153345 60.33457 1.652054
## 5 100.00000 1.835185 84.37224 1.634140
## 6 100.00000 1.950365 89.74772 1.465849
## cg18640183.percent cg20340716.percent cg24127244.percent sex.na childteen.na
## 1 5.230433 92.82739 2.252754 <NA> <NA>
## 2 5.154276 92.14317 2.162791 <NA> <NA>
## 3 3.810300 94.76437 1.497054 <NA> <NA>
## 4 4.436995 93.31084 2.591302 <NA> <NA>
## 5 5.221866 91.36594 2.034587 <NA> <NA>
## 6 4.878337 91.57463 1.992653 <NA> <NA>
## age.na m1city.na ethrace.factor.na race.factor.na cm1inpov.na peg.pm25.raw.na
## 1 <NA> <NA> <NA> <NA> <NA> <NA>
## 2 <NA> <NA> <NA> <NA> <NA> <NA>
## 3 <NA> <NA> <NA> <NA> <NA> <NA>
## 4 <NA> <NA> <NA> <NA> <NA> <NA>
## 5 <NA> <NA> <NA> <NA> <NA> <NA>
## 6 <NA> <NA> <NA> <NA> <NA> <NA>
## peg.pm10.raw.na peg.no2.raw.na immune.na epithelial.na include
## 1 <NA> <NA> <NA> <NA> 1
## 2 <NA> <NA> <NA> <NA> 1
## 3 <NA> <NA> <NA> <NA> 1
## 4 <NA> <NA> <NA> <NA> 1
## 5 <NA> <NA> <NA> <NA> 1
## 6 <NA> <NA> <NA> <NA> 1
output<-data.frame(matrix(nrow=10, ncol= 16))
colnames(output) <- c("Exposure", "Age", "Model", "DF", "IQRcoef.r", "IQRlcl.r", "IQRucl.r", "pval.r", "IQRcoef.c", "IQRlcl.c", "IQRucl.c", "pval.c", "IQRcoef.cs", "IQRlcl.cs", "IQRucl.cs", "pval.cs")
output$Exposure <- c(rep(c("PM2.5", "PM10"), 5))
output$Age <- c(rep("All",10 ))
output$Model <- c(rep("Primary", 2), rep("Age1", 2), rep("Age3", 2), rep("Coexposure", 2), rep("NOx", 2))
IQR(include$birth.pm25, na.rm=T)
## [1] 10.74194
IQR(include$birth.pm10, na.rm=T)
## [1] 3.223546
# Primary model
mod.pm25<-lme(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, random = ~ 1 | idnum, data=include, na.action=na.exclude)
summary(mod)$tTable[2,1] # Beta coefficient "Value"
## NULL
summary(mod)$tTable[2,2] # Standard error
## NULL
summary(mod)$tTable[2,3] # DF
## NULL
summary(mod)$tTable[2,5] # p-value
## NULL
mod.pm10<-lme(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, random = ~ 1 | idnum, data=include, na.action=na.exclude)
output$DF[1:2] <-c(summary(mod.pm25)$tTable[2,3], summary(mod.pm10)$tTable[2,3])
# str(intervals(mod))
# intervals(mod)$fixed[2,1] #lower
# intervals(mod)$fixed[2,3] #upper
output$IQRcoef.r[1:2] <- c(IQR(include$birth.pm25, na.rm=T) * c(summary(mod.pm25)$tTable[2,1], IQR(include$birth.pm10, na.rm=T) * summary(mod.pm10)$tTable[2,1]))
output$IQRlcl.r[1:2] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,1], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,1]))
output$IQRucl.r[1:2] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,3], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,3]))
output$pval.r[1:2] <-c(summary(mod.pm25)$tTable[2,5], summary(mod.pm10)$tTable[2,5])
# Age 1 sensitivity
mod.pm25<-lme(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm25, random = ~ 1 | idnum, data=include, na.action=na.exclude)
mod.pm10<-lme(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm10, random = ~ 1 | idnum, data=include, na.action=na.exclude)
output$DF[3:4] <-c(summary(mod.pm25)$tTable[2,3], summary(mod.pm10)$tTable[2,3])
output$IQRcoef.r[3:4] <- c(IQR(include$birth.pm25, na.rm=T) * c(summary(mod.pm25)$tTable[2,1], IQR(include$birth.pm10, na.rm=T) * summary(mod.pm10)$tTable[2,1]))
output$IQRlcl.r[3:4] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,1], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,1]))
output$IQRucl.r[3:4] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,3], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,3]))
output$pval.r[3:4] <-c(summary(mod.pm25)$tTable[2,5], summary(mod.pm10)$tTable[2,5])
# Age 3 sensitivity
mod.pm25<-lme(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm25, random = ~ 1 | idnum, data=include, na.action=na.exclude)
mod.pm10<-lme(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm10, random = ~ 1 | idnum, data=include, na.action=na.exclude)
output$DF[5:6] <-c(summary(mod.pm25)$tTable[2,3], summary(mod.pm10)$tTable[2,3])
output$IQRcoef.r[5:6] <- c(IQR(include$birth.pm25, na.rm=T) * c(summary(mod.pm25)$tTable[2,1], IQR(include$birth.pm10, na.rm=T) * summary(mod.pm10)$tTable[2,1]))
output$IQRlcl.r[5:6] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,1], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,1]))
output$IQRucl.r[5:6] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,3], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,3]))
output$pval.r[5:6] <-c(summary(mod.pm25)$tTable[2,5], summary(mod.pm10)$tTable[2,5])
# Co-exposure sensitivity
mod.pm25<-lme(peg.pm25.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm10, random = ~ 1 | idnum, data=include, na.action=na.exclude)
mod.pm10<-lme(peg.pm10.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm25, random = ~ 1 | idnum, data=include, na.action=na.exclude)
output$DF[7:8] <-c(summary(mod.pm25)$tTable[2,3], summary(mod.pm10)$tTable[2,3])
output$IQRcoef.r[7:8] <- c(IQR(include$birth.pm25, na.rm=T) * c(summary(mod.pm25)$tTable[2,1], IQR(include$birth.pm10, na.rm=T) * summary(mod.pm10)$tTable[2,1]))
output$IQRlcl.r[7:8] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,1], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,1]))
output$IQRucl.r[7:8] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,3], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,3]))
output$pval.r[7:8] <-c(summary(mod.pm25)$tTable[2,5], summary(mod.pm10)$tTable[2,5])
# NOX sensitivity
mod.pm25<-lme(peg.no2.rawstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, random = ~ 1 | idnum, data=include, na.action=na.exclude)
mod.pm10<-lme(peg.no2.rawstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, random = ~ 1 | idnum, data=include, na.action=na.exclude)
output$DF[9:10] <-c(summary(mod.pm25)$tTable[2,3], summary(mod.pm10)$tTable[2,3])
output$IQRcoef.r[9:10] <- c(IQR(include$birth.pm25, na.rm=T) * c(summary(mod.pm25)$tTable[2,1], IQR(include$birth.pm10, na.rm=T) * summary(mod.pm10)$tTable[2,1]))
output$IQRlcl.r[9:10] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,1], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,1]))
output$IQRucl.r[9:10] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,3], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,3]))
output$pval.r[9:10] <-c(summary(mod.pm25)$tTable[2,5], summary(mod.pm10)$tTable[2,5])
############################
#### Center peg.pm25.centstd
# Primary model
mod.pm25<-lme(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, random = ~ 1 | idnum, data=include, na.action=na.exclude)
mod.pm10<-lme(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, random = ~ 1 | idnum, data=include, na.action=na.exclude)
output$IQRcoef.c[1:2] <- c(IQR(include$birth.pm25, na.rm=T) * c(summary(mod.pm25)$tTable[2,1], IQR(include$birth.pm10, na.rm=T) * summary(mod.pm10)$tTable[2,1]))
output$IQRlcl.c[1:2] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,1], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,1]))
output$IQRucl.c[1:2] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,3], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,3]))
output$pval.c[1:2] <-c(summary(mod.pm25)$tTable[2,5], summary(mod.pm10)$tTable[2,5])
# Age 1 sensitivity
mod.pm25<-lme(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm25, random = ~ 1 | idnum, data=include, na.action=na.exclude)
mod.pm10<-lme(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm10, random = ~ 1 | idnum, data=include, na.action=na.exclude)
output$IQRcoef.c[3:4] <- c(IQR(include$birth.pm25, na.rm=T) * c(summary(mod.pm25)$tTable[2,1], IQR(include$birth.pm10, na.rm=T) * summary(mod.pm10)$tTable[2,1]))
output$IQRlcl.c[3:4] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,1], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,1]))
output$IQRucl.c[3:4] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,3], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,3]))
output$pval.c[3:4] <-c(summary(mod.pm25)$tTable[2,5], summary(mod.pm10)$tTable[2,5])
# Age 3 sensitivity
mod.pm25<-lme(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm25, random = ~ 1 | idnum, data=include, na.action=na.exclude)
mod.pm10<-lme(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm10, random = ~ 1 | idnum, data=include, na.action=na.exclude)
output$IQRcoef.c[5:6] <- c(IQR(include$birth.pm25, na.rm=T) * c(summary(mod.pm25)$tTable[2,1], IQR(include$birth.pm10, na.rm=T) * summary(mod.pm10)$tTable[2,1]))
output$IQRlcl.c[5:6] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,1], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,1]))
output$IQRucl.c[5:6] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,3], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,3]))
output$pval.c[5:6] <-c(summary(mod.pm25)$tTable[2,5], summary(mod.pm10)$tTable[2,5])
# Co-exposure sensitivity
mod.pm25<-lme(peg.pm25.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm10, random = ~ 1 | idnum, data=include, na.action=na.exclude)
mod.pm10<-lme(peg.pm10.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm25, random = ~ 1 | idnum, data=include, na.action=na.exclude)
output$IQRcoef.c[7:8] <- c(IQR(include$birth.pm25, na.rm=T) * c(summary(mod.pm25)$tTable[2,1], IQR(include$birth.pm10, na.rm=T) * summary(mod.pm10)$tTable[2,1]))
output$IQRlcl.c[7:8] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,1], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,1]))
output$IQRucl.c[7:8] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,3], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,3]))
output$pval.c[7:8] <-c(summary(mod.pm25)$tTable[2,5], summary(mod.pm10)$tTable[2,5])
# NOX sensitivity
mod.pm25<-lme(peg.no2.centstd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, random = ~ 1 | idnum, data=include, na.action=na.exclude)
mod.pm10<-lme(peg.no2.centstd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, random = ~ 1 | idnum, data=include, na.action=na.exclude)
output$IQRcoef.c[9:10] <- c(IQR(include$birth.pm25, na.rm=T) * c(summary(mod.pm25)$tTable[2,1], IQR(include$birth.pm10, na.rm=T) * summary(mod.pm10)$tTable[2,1]))
output$IQRlcl.c[9:10] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,1], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,1]))
output$IQRucl.c[9:10] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,3], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,3]))
output$pval.c[9:10] <-c(summary(mod.pm25)$tTable[2,5], summary(mod.pm10)$tTable[2,5])
#### Center Scaled peg.pm10.centscalestd
# Primary model
mod.pm25<-lme(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, random = ~ 1 | idnum, data=include, na.action=na.exclude)
mod.pm10<-lme(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, random = ~ 1 | idnum, data=include, na.action=na.exclude)
output$IQRcoef.cs[1:2] <- c(IQR(include$birth.pm25, na.rm=T) * c(summary(mod.pm25)$tTable[2,1], IQR(include$birth.pm10, na.rm=T) * summary(mod.pm10)$tTable[2,1]))
output$IQRlcl.cs[1:2] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,1], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,1]))
output$IQRucl.cs[1:2] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,3], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,3]))
output$pval.cs[1:2] <-c(summary(mod.pm25)$tTable[2,5], summary(mod.pm10)$tTable[2,5])
# Age 1 sensitivity
mod.pm25<-lme(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm25, random = ~ 1 | idnum, data=include, na.action=na.exclude)
mod.pm10<-lme(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age1.pm10, random = ~ 1 | idnum, data=include, na.action=na.exclude)
output$IQRcoef.cs[3:4] <- c(IQR(include$birth.pm25, na.rm=T) * c(summary(mod.pm25)$tTable[2,1], IQR(include$birth.pm10, na.rm=T) * summary(mod.pm10)$tTable[2,1]))
output$IQRlcl.cs[3:4] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,1], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,1]))
output$IQRucl.cs[3:4] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,3], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,3]))
output$pval.cs[3:4] <-c(summary(mod.pm25)$tTable[2,5], summary(mod.pm10)$tTable[2,5])
# Age 3 sensitivity
mod.pm25<-lme(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm25, random = ~ 1 | idnum, data=include, na.action=na.exclude)
mod.pm10<-lme(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + age3.pm10, random = ~ 1 | idnum, data=include, na.action=na.exclude)
output$IQRcoef.cs[5:6] <- c(IQR(include$birth.pm25, na.rm=T) * c(summary(mod.pm25)$tTable[2,1], IQR(include$birth.pm10, na.rm=T) * summary(mod.pm10)$tTable[2,1]))
output$IQRlcl.cs[5:6] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,1], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,1]))
output$IQRucl.cs[5:6] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,3], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,3]))
output$pval.cs[5:6] <-c(summary(mod.pm25)$tTable[2,5], summary(mod.pm10)$tTable[2,5])
# Co-exposure sensitivity
mod.pm25<-lme(peg.pm25.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm10, random = ~ 1 | idnum, data=include, na.action=na.exclude)
mod.pm10<-lme(peg.pm10.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes + birth.pm25, random = ~ 1 | idnum, data=include, na.action=na.exclude)
output$IQRcoef.cs[7:8] <- c(IQR(include$birth.pm25, na.rm=T) * c(summary(mod.pm25)$tTable[2,1], IQR(include$birth.pm10, na.rm=T) * summary(mod.pm10)$tTable[2,1]))
output$IQRlcl.cs[7:8] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,1], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,1]))
output$IQRucl.cs[7:8] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,3], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,3]))
output$pval.cs[7:8] <-c(summary(mod.pm25)$tTable[2,5], summary(mod.pm10)$tTable[2,5])
# NOX sensitivity
mod.pm25<-lme(peg.no2.centscalestd ~ birth.pm25 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, random = ~ 1 | idnum, data=include, na.action=na.exclude)
mod.pm10<-lme(peg.no2.centscalestd ~ birth.pm10 + age.dnam + sex + matrace.factor + cm1inpov + m1b2 + Epithelial.cells + Leukocytes, random = ~ 1 | idnum, data=include, na.action=na.exclude)
output$IQRcoef.cs[9:10] <- c(IQR(include$birth.pm25, na.rm=T) * c(summary(mod.pm25)$tTable[2,1], IQR(include$birth.pm10, na.rm=T) * summary(mod.pm10)$tTable[2,1]))
output$IQRlcl.cs[9:10] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,1], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,1]))
output$IQRucl.cs[9:10] <- c(IQR(include$birth.pm25, na.rm=T) * c(intervals(mod.pm25)$fixed[2,3], IQR(include$birth.pm10, na.rm=T) * intervals(mod.pm10)$fixed[2,3]))
output$pval.cs[9:10] <-c(summary(mod.pm25)$tTable[2,5], summary(mod.pm10)$tTable[2,5])
output
## Exposure Age Model DF IQRcoef.r IQRlcl.r IQRucl.r
## 1 PM2.5 All Primary 787 -0.02873504 -0.07324774 0.015777659
## 2 PM10 All Primary 728 -0.14716531 -0.30380034 0.009469716
## 3 PM2.5 All Age1 738 -0.01733323 -0.07063770 0.035971247
## 4 PM10 All Age1 682 -0.24216639 -0.45457048 -0.029762301
## 5 PM2.5 All Age3 714 -0.03162336 -0.08930200 0.026055274
## 6 PM10 All Age3 666 -0.20037031 -0.42035751 0.019616883
## 7 PM2.5 All Coexposure 727 -0.02783807 -0.08061208 0.024935936
## 8 PM10 All Coexposure 727 -0.14739919 -0.30788733 0.013088943
## 9 PM2.5 All NOx 787 0.02919143 -0.05510955 0.113492404
## 10 PM10 All NOx 728 1.41661537 0.70185524 2.131375492
## pval.r IQRcoef.c IQRlcl.c IQRucl.c pval.c IQRcoef.cs
## 1 0.2054594307 -0.02873504 -0.07324774 0.015777659 0.2054594307 -0.016707301
## 2 0.0655110474 -0.14716531 -0.30380034 0.009469716 0.0655110473 -0.132834150
## 3 0.5234268630 -0.01733323 -0.07063770 0.035971247 0.5234268630 -0.005489542
## 4 0.0255057953 -0.24216639 -0.45457048 -0.029762301 0.0255057952 -0.208649113
## 5 0.2821072200 -0.03162336 -0.08930200 0.026055274 0.2821072200 -0.018901365
## 6 0.0741597166 -0.20037031 -0.42035751 0.019616883 0.0741597162 -0.169874718
## 7 0.3007345192 -0.02783807 -0.08061208 0.024935936 0.3007345192 -0.011909817
## 8 0.0717838008 -0.14739919 -0.30788733 0.013088943 0.0717838007 -0.145344782
## 9 0.4968725601 0.02919143 -0.05510955 0.113492401 0.4968725377 0.007053005
## 10 0.0001089792 1.41661537 0.70185524 2.131375490 0.0001089792 1.066075193
## IQRlcl.cs IQRucl.cs pval.cs
## 1 -0.05139483 0.0179802258 0.3447072533
## 2 -0.27387976 0.0082114596 0.0648729087
## 3 -0.04706967 0.0360905876 0.7955641642
## 4 -0.39966480 -0.0176334255 0.0323293250
## 5 -0.06375523 0.0259524992 0.4083270661
## 6 -0.36765293 0.0279034925 0.0921663503
## 7 -0.05294905 0.0291294137 0.5690292787
## 8 -0.28979073 -0.0008988394 0.0485950295
## 9 -0.06076665 0.0748726595 0.8382943029
## 10 0.48776642 1.6443839606 0.0003161086
write.csv(output, file=here("Output",paste0("FFCW_AirPoll_MixedEffects_Regression_Primary_", date, ".csv")) )